Fix RCS1179
This commit is contained in:
@@ -1058,6 +1058,9 @@ dotnet_diagnostic.RCS1172.severity = warning
|
||||
# Unused 'this' parameter.
|
||||
dotnet_diagnostic.RCS1175.severity = warning
|
||||
|
||||
# Unnecessary assignment.
|
||||
dotnet_diagnostic.RCS1179.severity = warning
|
||||
|
||||
# Use constant instead of field.
|
||||
dotnet_diagnostic.RCS1187.severity = warning
|
||||
|
||||
|
||||
@@ -159,11 +159,10 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
|
||||
Action WrapOnPlayComplete(LuaFunction onPlayComplete)
|
||||
{
|
||||
Action onComplete;
|
||||
if (onPlayComplete != null)
|
||||
{
|
||||
var f = (LuaFunction)onPlayComplete.CopyReference();
|
||||
onComplete = () =>
|
||||
return () =>
|
||||
{
|
||||
try
|
||||
{
|
||||
@@ -177,9 +176,7 @@ namespace OpenRA.Mods.Common.Scripting
|
||||
};
|
||||
}
|
||||
else
|
||||
onComplete = () => { };
|
||||
|
||||
return onComplete;
|
||||
return () => { };
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user