diff options
author | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-01-28 14:00:28 (GMT) |
---|---|---|
committer | Vitaly Stakhovsky <vvs31415@gitlab.org> | 2019-01-28 14:09:59 (GMT) |
commit | 2fc69ba0b33e8f5f1b6301f37fc1479fba420b93 (patch) | |
tree | 3e870a7ce9eac0b8d2eeaab9aa537efba4941b41 /Source/cmake.cxx | |
parent | 1593e16d881bf74fd8981e1290d20f28191f1f0e (diff) | |
download | CMake-2fc69ba0b33e8f5f1b6301f37fc1479fba420b93.zip CMake-2fc69ba0b33e8f5f1b6301f37fc1479fba420b93.tar.gz CMake-2fc69ba0b33e8f5f1b6301f37fc1479fba420b93.tar.bz2 |
cmFileTimeComparison: use std::string arguments
Diffstat (limited to 'Source/cmake.cxx')
-rw-r--r-- | Source/cmake.cxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/cmake.cxx b/Source/cmake.cxx index 744b8fc..10cbb6e 100644 --- a/Source/cmake.cxx +++ b/Source/cmake.cxx @@ -2146,8 +2146,7 @@ int cmake::CheckBuildSystem() std::string dep_newest = *dep++; for (; dep != depends.end(); ++dep) { int result = 0; - if (this->FileComparison->FileTimeCompare(dep_newest.c_str(), dep->c_str(), - &result)) { + if (this->FileComparison->FileTimeCompare(dep_newest, *dep, &result)) { if (result < 0) { dep_newest = *dep; } @@ -2166,8 +2165,7 @@ int cmake::CheckBuildSystem() std::string out_oldest = *out++; for (; out != outputs.end(); ++out) { int result = 0; - if (this->FileComparison->FileTimeCompare(out_oldest.c_str(), out->c_str(), - &result)) { + if (this->FileComparison->FileTimeCompare(out_oldest, *out, &result)) { if (result > 0) { out_oldest = *out; } @@ -2184,8 +2182,8 @@ int cmake::CheckBuildSystem() // If any output is older than any dependency then rerun. { int result = 0; - if (!this->FileComparison->FileTimeCompare(out_oldest.c_str(), - dep_newest.c_str(), &result) || + if (!this->FileComparison->FileTimeCompare(out_oldest, dep_newest, + &result) || result < 0) { if (verbose) { std::ostringstream msg; @@ -2446,8 +2444,7 @@ static bool cmakeCheckStampFile(const std::string& stampName, bool verbose) while (cmSystemTools::GetLineFromStream(fin, dep)) { int result; if (!dep.empty() && dep[0] != '#' && - (!ftc.FileTimeCompare(stampDepends.c_str(), dep.c_str(), &result) || - result < 0)) { + (!ftc.FileTimeCompare(stampDepends, dep, &result) || result < 0)) { // The stamp depends file is older than this dependency. The // build system is really out of date. std::cout << "CMake is re-running because " << stampName |