TeamUlysses / ulib

ULib: A Lua library for more rapid development on Garry's Mod servers
http://ulyssesmod.net
Other
104 stars 55 forks source link

Made some globals to local vars #23

Closed markusmarkusz closed 7 years ago

markusmarkusz commented 8 years ago

Just made some vars that are global to local vars. I've made a short test with the changes and I experienced no problems.

One question: What about this?

Table: root_class This is a local table that holds our functions that we want all classes to have.

Should root_class be global if you write "local table"?

bmwalters commented 8 years ago

Did you use Willox' GMod Global Variables Finder to detect these? That's the most thorough and accurate tool I've found.

markusmarkusz commented 8 years ago

@bmwalters I must admit that I used the tool. I wanted to check my addons, if I have made all the variables to locals. Primary I want to check this because many creators of weapons left variables global for no use. And I only scanned the addons folder because it was faster then checking all folders individually. But yes, this tool is very accurate. It has helped me to find some globals that I have overseen.