Merge "Fix bugprone-string-integer-assignment warnings" am: 262b58cd07
Change-Id: I0b060938438f06ed35d5e669efa23926aa77c85a
This commit is contained in:
commit
9b69f80df2
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue