Merge "Fix bugprone-string-integer-assignment warnings"

This commit is contained in:
Chih-hung Hsieh 2020-03-10 00:07:58 +00:00 committed by Gerrit Code Review
commit 262b58cd07
1 changed files with 3 additions and 3 deletions

View File

@ -150,11 +150,11 @@ static std::string RandomAlphaNumString(size_t len) {
for (size_t i = 0; i < len; ++i) {
uint8_t val = dist(mt);
if (val < 10) {
ret += '0' + val;
ret += static_cast<char>('0' + val);
} else if (val < 36) {
ret += 'A' + (val - 10);
ret += static_cast<char>('A' + (val - 10));
} else {
ret += 'a' + (val - 36);
ret += static_cast<char>('a' + (val - 36));
}
}
return ret;