Merge topic 'cmStringAlgorithms_ulong'

935fbe0b04 cmStringAlgorithms: Add cmStrToLong and cmStrToULong

Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !3681
This commit is contained in:
Kyle Edwards
2019-08-16 18:49:13 +00:00
committed by Kitware Robot
20 changed files with 105 additions and 74 deletions

View File

@@ -2357,8 +2357,7 @@ bool HandleLockCommand(std::vector<std::string> const& args,
return false;
}
long scanned;
if (!cmSystemTools::StringToLong(args[i].c_str(), &scanned) ||
scanned < 0) {
if (!cmStrToLong(args[i], &scanned) || scanned < 0) {
std::ostringstream e;
e << "TIMEOUT value \"" << args[i] << "\" is not an unsigned integer.";
status.GetMakefile().IssueMessage(MessageType::FATAL_ERROR, e.str());