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/cmakemain.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/cmakemain.cxx')
-rw-r--r-- | Source/cmakemain.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmakemain.cxx b/Source/cmakemain.cxx index 10a6825..c96ccc7 100644 --- a/Source/cmakemain.cxx +++ b/Source/cmakemain.cxx @@ -321,7 +321,7 @@ int extract_job_number(int& index, char const* current, char const* next, unsigned long numJobs = 0; if (jobString.empty()) { jobs = cmake::DEFAULT_BUILD_PARALLEL_LEVEL; - } else if (cmSystemTools::StringToULong(jobString.c_str(), &numJobs)) { + } else if (cmStrToULong(jobString, &numJobs)) { if (numJobs == 0) { std::cerr << "The <jobs> value requires a positive integer argument.\n\n"; @@ -439,7 +439,7 @@ int do_build(int ac, char const* const* av) jobs = cmake::DEFAULT_BUILD_PARALLEL_LEVEL; } else { unsigned long numJobs = 0; - if (cmSystemTools::StringToULong(parallel.c_str(), &numJobs)) { + if (cmStrToULong(parallel, &numJobs)) { if (numJobs == 0) { std::cerr << "The CMAKE_BUILD_PARALLEL_LEVEL environment variable " "requires a positive integer argument.\n\n"; |