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

DIFFICULTIES[]could be replaced by Difficulties[i].ToPascalCase() #18

Open
BinToss opened this issue Dec 8, 2021 · 0 comments
Open
Assignees
Labels
enhancement New feature or request

Comments

@BinToss
Copy link
Member

BinToss commented Dec 8, 2021

Why have two arrays of values that differ by character cases?

const char *DIFFICULTIES[] = {
	"Noble",
	"Normal",
	"Heroic",
	"Legendary"
};

const char *Difficulties[] = {
	"noble",
	"normal",
	"heroic",
	"legendary"
};
std::string difficulty_str;
std::string real_difficulty;
if (difficulty < 4) {
    real_difficulty = Difficulties[difficulty];
    difficulty_str = DIFFICULTIES[difficulty];
    difficulty_str += " Difficulty";
}
@BinToss BinToss added the enhancement New feature or request label Dec 8, 2021
@BinToss BinToss self-assigned this Dec 8, 2021
BinToss added a commit that referenced this issue Dec 18, 2021
Data-driven metadata
#17

 PascalCase Conversion
 #18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant