New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tiberian Dawn Lua code cleanup #20275
Conversation
fe7392b
to
53a9f26
Compare
@@ -158,30 +158,30 @@ Trigger.OnAllKilledOrCaptured(GDIBase, function() | |||
Utils.Do(GDI.GetGroundAttackers(), IdleHunt) | |||
end) | |||
|
|||
Trigger.OnKilled(GDIProc, function(building) | |||
Trigger.OnKilled(GDIProc, function() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LUA is flexible in the type of function that you pass?
I will also not lead to a memory leak of the building argument. I guess it's reference counted and it won't.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, you don't need to specify the parameters if you don't use them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The IDE showed it as greyed out, but didn't issue a warning.
Uppercase global variables. Declare local variables. Remove unused variable.
53a9f26
to
a188c91
Compare
Split from #20265.