diff options
author | Oleg Morozenkov <reo7sp@users.noreply.github.com> | 2017-01-23 12:39:42 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-23 12:39:42 +0300 |
commit | 310792316c48bc8f3218abb30d411f7e1c823747 (patch) | |
tree | fc0ebbd358698f139958785edd68f0d2f3b4b5b8 /src/tools/StringTools.cpp | |
parent | 01688d68293972e66611014c203218d37b940dc2 (diff) | |
parent | cfd0b398c3a300173339533909732b37503c34ed (diff) |
Merge pull request #36 from ymuv/master
Fix -Wsign-compare and control reaches end of non-void function
Diffstat (limited to 'src/tools/StringTools.cpp')
-rw-r--r-- | src/tools/StringTools.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tools/StringTools.cpp b/src/tools/StringTools.cpp index a48b4eb..ab7da46 100644 --- a/src/tools/StringTools.cpp +++ b/src/tools/StringTools.cpp @@ -80,7 +80,7 @@ string generateRandomString(size_t length) { static const string chars("qwertyuiopasdfghjklzxcvbnmQWERTYUIOPASDFGHJKLZXCVBNM1234567890-=[]\\;',./!@#$%^&*()_+{}|:\"<>?`~"); static const size_t charsLen = chars.length(); string result; - for (int i = 0; i < length; ++i) { + for (size_t i = 0; i < length; ++i) { result += chars[rand() % charsLen]; } return result; |