diff options
author | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-10 11:37:34 (GMT) |
---|---|---|
committer | Sebastian Holtermann <sebholt@xwmw.org> | 2019-08-10 12:39:03 (GMT) |
commit | 935fbe0b0454163678bc4ef19e1bee95a7a31b4d (patch) | |
tree | 794eea739dbd5e5fc184539e4fdd856f8fad3364 /Source/cmQtAutoMocUic.cxx | |
parent | 32a7605e69e3faf56bf51da1641a7ae897d23826 (diff) | |
download | CMake-935fbe0b0454163678bc4ef19e1bee95a7a31b4d.zip CMake-935fbe0b0454163678bc4ef19e1bee95a7a31b4d.tar.gz CMake-935fbe0b0454163678bc4ef19e1bee95a7a31b4d.tar.bz2 |
cmStringAlgorithms: Add cmStrToLong and cmStrToULong
This adds the following functions to cmStringAlgorithms:
- `cmStrToLong`: moved from `cmSystemTools::StringToLong`
- `cmStrToULong`: moved from `cmSystemTools::StringToULong`
Overloads of the given functions for `std::string` are added as well.
Diffstat (limited to 'Source/cmQtAutoMocUic.cxx')
-rw-r--r-- | Source/cmQtAutoMocUic.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Source/cmQtAutoMocUic.cxx b/Source/cmQtAutoMocUic.cxx index e693816..6f3b2c6 100644 --- a/Source/cmQtAutoMocUic.cxx +++ b/Source/cmQtAutoMocUic.cxx @@ -1582,7 +1582,7 @@ bool cmQtAutoMocUic::Init(cmMakefile* makefile) BaseConst_.MultiConfig = InfoGetBool("AM_MULTI_CONFIG"); { unsigned long num = 1; - if (cmSystemTools::StringToULong(InfoGet("AM_PARALLEL").c_str(), &num)) { + if (cmStrToULong(InfoGet("AM_PARALLEL"), &num)) { num = std::max<unsigned long>(num, 1); num = std::min<unsigned long>(num, ParallelMax); } @@ -1630,8 +1630,7 @@ bool cmQtAutoMocUic::Init(cmMakefile* makefile) // - Qt environment { unsigned long qtv = BaseConst_.QtVersionMajor; - if (cmSystemTools::StringToULong(InfoGet("AM_QT_VERSION_MAJOR").c_str(), - &qtv)) { + if (cmStrToULong(InfoGet("AM_QT_VERSION_MAJOR"), &qtv)) { BaseConst_.QtVersionMajor = static_cast<unsigned int>(qtv); } } |