summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalNinjaGenerator.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2019-05-17 13:25:56 (GMT)
committerKitware Robot <kwrobot@kitware.com>2019-05-17 13:26:05 (GMT)
commit3020354f7c86f959d707aed2b833692204dd7778 (patch)
tree79dc1ca02491338fe78001ffdd4c72ad26cac212 /Source/cmGlobalNinjaGenerator.cxx
parent736f9d184da2109b009078e3184e996883bd7554 (diff)
parent23e8364aedcbeb7ce606b6075c98827e52f0c7f6 (diff)
downloadCMake-3020354f7c86f959d707aed2b833692204dd7778.zip
CMake-3020354f7c86f959d707aed2b833692204dd7778.tar.gz
CMake-3020354f7c86f959d707aed2b833692204dd7778.tar.bz2
Merge topic 'string-cleanup'
23e8364aed Source: std::string related cleanup Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: Sebastian Holtermann <sebholt@web.de> Merge-request: !3324
Diffstat (limited to 'Source/cmGlobalNinjaGenerator.cxx')
-rw-r--r--Source/cmGlobalNinjaGenerator.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/Source/cmGlobalNinjaGenerator.cxx b/Source/cmGlobalNinjaGenerator.cxx
index 00276f8..5ddaaa3 100644
--- a/Source/cmGlobalNinjaGenerator.cxx
+++ b/Source/cmGlobalNinjaGenerator.cxx
@@ -574,7 +574,7 @@ void cmGlobalNinjaGenerator::CheckNinjaFeatures()
static std::string const k_DYNDEP_ = ".dyndep-";
std::string::size_type pos = this->NinjaVersion.find(k_DYNDEP_);
if (pos != std::string::npos) {
- const char* fv = this->NinjaVersion.c_str() + pos + k_DYNDEP_.size();
+ const char* fv = &this->NinjaVersion[pos + k_DYNDEP_.size()];
cmSystemTools::StringToULong(fv, &this->NinjaSupportsDyndeps);
}
}
@@ -1254,7 +1254,7 @@ void cmGlobalNinjaGenerator::WriteUnknownExplicitDependencies(std::ostream& os)
for (std::string const& i : unknownExplicitDepends) {
// verify the file is in the build directory
std::string const absDepPath =
- cmSystemTools::CollapseFullPath(i, rootBuildDirectory.c_str());
+ cmSystemTools::CollapseFullPath(i, rootBuildDirectory);
bool const inBuildDir =
cmSystemTools::IsSubDirectory(absDepPath, rootBuildDirectory);
if (inBuildDir) {