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