diff options
Diffstat (limited to 'Source/cmStringCommand.cxx')
-rw-r--r-- | Source/cmStringCommand.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Source/cmStringCommand.cxx b/Source/cmStringCommand.cxx index b07eae1..592f66e 100644 --- a/Source/cmStringCommand.cxx +++ b/Source/cmStringCommand.cxx @@ -818,7 +818,7 @@ bool cmStringCommand::HandleRandomCommand(std::vector<std::string> const& args) const char* alphaPtr = alphabet.c_str(); int cc; for (cc = 0; cc < length; cc++) { - int idx = (int)(sizeofAlphabet * rand() / (RAND_MAX + 1.0)); + int idx = static_cast<int>(sizeofAlphabet * rand() / (RAND_MAX + 1.0)); result.push_back(*(alphaPtr + idx)); } result.push_back(0); |