Better rand_string parameter types.

GitOrigin-RevId: 2702375880663d3cfe1546b047e01ba02ffcd2ce
This commit is contained in:
levlam 2020-03-15 02:01:22 +03:00
parent 968689157c
commit a0c5c5900a

View File

@ -110,8 +110,8 @@ class Stage {
std::atomic<uint64> value_{0};
};
inline string rand_string(char from, char to, int len) {
string res(len, 0);
inline string rand_string(int from, int to, size_t len) {
string res(len, '\0');
for (auto &c : res) {
c = static_cast<char>(Random::fast(from, to));
}