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

SQL Admin Manager refinements and standardisation #974

Merged
merged 3 commits into from Apr 6, 2019
Merged

SQL Admin Manager refinements and standardisation #974

merged 3 commits into from Apr 6, 2019

Conversation

@b3none
Copy link
Contributor

@b3none b3none commented Mar 26, 2019

Changes:

  • Use the sizeof() function to declare the size of the for loops as opposed to hard-coding the value because it feels cleaner to do it that way.
  • Dynamically pad the variables storing multiple values.
plugins/sql-admin-manager.sp Outdated Show resolved Hide resolved
@Headline
Copy link
Member

@Headline Headline commented Mar 26, 2019

Good catch, thanks for this.

I think we could go a step further and remove the hard coded 1st dim size.

char[7][] ... -> char[][] ...

Copy link
Member

@Headline Headline left a comment

Thanks!

Gonna wait for another set of eyes before it get's pulled in

@b3none b3none changed the title Switched to sizeof instead of hard-coding for loop size SQL Admin Manager refinements and standardisation Mar 26, 2019
Copy link

@maximsmol maximsmol left a comment

Looks good to me too :P

Copy link
Contributor

@TF2CutContentWiki TF2CutContentWiki left a comment

I can approve things too!

#pragma newdecls required

#define CURRENT_SCHEMA_VERSION 1409
#define SCHEMA_UPGRADE_1 1409

int current_version[4] = {1, 0, 0, CURRENT_SCHEMA_VERSION};
int current_version[] = {1, 0, 0, CURRENT_SCHEMA_VERSION};
Copy link

@MitchDizzle MitchDizzle Apr 6, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Weird design question but why is it '1.0.0.%VERSION%" why not just the version without the prefix of '1.0.0.'?
(I know this probably isn't the right place to ask this either.)

@KyleSanderson KyleSanderson merged commit 8f05274 into alliedmodders:master Apr 6, 2019
2 checks passed
@KyleSanderson
Copy link
Member

@KyleSanderson KyleSanderson commented Apr 6, 2019

Thank you.

@b3none b3none deleted the patch-1 branch Apr 6, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

6 participants