Skip to content
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

Merged
merged 1 commit into from Sep 11, 2022
Merged

Conversation

Mailaender
Copy link
Member

Split from #20265.

abcdefg30
abcdefg30 previously approved these changes Sep 9, 2022
@@ -158,30 +158,30 @@ Trigger.OnAllKilledOrCaptured(GDIBase, function()
Utils.Do(GDI.GetGroundAttackers(), IdleHunt)
end)

Trigger.OnKilled(GDIProc, function(building)
Trigger.OnKilled(GDIProc, function()
Copy link
Contributor

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.

Copy link
Member

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.

Copy link
Member Author

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.

mods/cnc/maps/gdi04b/gdi04b.lua Outdated Show resolved Hide resolved
mods/cnc/maps/gdi04c/gdi04c.lua Show resolved Hide resolved
Uppercase global variables.
Declare local variables.
Remove unused variable.
@PunkPun PunkPun merged commit b8e261f into OpenRA:bleed Sep 11, 2022
@PunkPun
Copy link
Member

PunkPun commented Sep 11, 2022

Changelog

@Mailaender Mailaender deleted the cnc-lua-cleanup branch September 11, 2022 17:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants