Skip to content

Commit c3c86bf

Browse files
authored
constexpr auto and restore maxNum
1 parent a2d8411 commit c3c86bf

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Client/core/CNickGen.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -196,9 +196,9 @@ const char* const szNouns[] = {
196196
"Vampire", "Parasite", "Tramp", "Bum", "Hobo", "Hitchhiker", "Deadbeat", "Acrobat",
197197
};
198198

199-
const int numAdjectives = std::size(szAdjectives);
200-
const int numNouns = std::size(szNouns);
201-
const int maxNum = static_cast<int>(RAND_MAX);
199+
constexpr auto numAdjectives = std::size(szAdjectives);
200+
constexpr auto numNouns = std::size(szNouns);
201+
constexpr auto maxNum = 100;
202202

203203
SString CNickGen::GetRandomNickname()
204204
{

0 commit comments

Comments
 (0)