-
-
Notifications
You must be signed in to change notification settings - Fork 203
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
Update admin.sma #1063
base: master
Are you sure you want to change the base?
Update admin.sma #1063
Conversation
new variables already defined passed to static
fix macOS compiler
use max size according to amxconst
you have wrong indentation, also why static instead of new ? you keep memory used instead of freeing it |
|
you should only use static when its not feasible to use new for example: 1.a function that is called multiple times in a second yes, static is faster than new, but you keep memory occupied, why would you need to keep memory occupied for a function that is call only once in a minute ? just think why c/c++ or similar languages dont use global variables and instead prefer to use dynamic allocation |
|
we free, memory ;)
Well, memory is cheap today and static is useful in expensive operations, but still I see this PR trivial or really minimal priority because the changes will not bring any benefit because this code isn't doing anything expensive or not being called so many times. In any case, the use of constants instead of magic numbers is a great change and isn't mentioned in the PR. Also, I see that swapping console_print() to engclient_print() is not a good change because the former has support for UTF-8 character which is useful in a multilingual context while I'm not that sure about engclient_print(). So by trying to bring a small optimization, you're maybe breaking something. I have notice too that the plugin isn't fully translated. Other reason which the PR is not good is whitespaces changes and code formatting changes which obsfucates what you're really trying to fix/improve and less chances to get your PR merged. Those should be in another PR or in the final commit. |
|
changelog
added
edited
charsmax
is now the protagonistconfigsDir[MAX_RESOURCE_PATH_LENGTH]
replaced
format
->formatex
console_print
->engclient_print
eliminated
We don't see why apply it without using
#pragma semicolon 1