diff options
author | Peter Powell <petpow@saberuk.com> | 2017-11-17 00:02:03 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2017-11-17 15:33:01 +0000 |
commit | 36040be2952186d56a6646ee7d972aaafdd4e31a (patch) | |
tree | 72be7108a94dd6bd0ea2842c53ba8890c44d12d8 /src/helperfuncs.cpp | |
parent | 3b51dfb1d611a874c3f1138d1c1ec1bb8984334c (diff) |
Fix a ton of -Wsign-conversion warnings.
Diffstat (limited to 'src/helperfuncs.cpp')
-rw-r--r-- | src/helperfuncs.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 7e992c4a6..ddcff5e55 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -393,13 +393,13 @@ std::string InspIRCd::TimeString(time_t curtime, const char* format, bool utc) return buffer; } -std::string InspIRCd::GenRandomStr(int length, bool printable) +std::string InspIRCd::GenRandomStr(unsigned int length, bool printable) { char* buf = new char[length]; GenRandom(buf, length); std::string rv; rv.resize(length); - for(int i=0; i < length; i++) + for(size_t i = 0; i < length; i++) rv[i] = printable ? 0x3F + (buf[i] & 0x3F) : buf[i]; delete[] buf; return rv; |