summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-26 20:52:22 (GMT)
committerDaniel Pfeifer <daniel@pfeifer-mail.de>2016-05-26 20:52:22 (GMT)
commit1b2bb93302116a4791cf82e9cce028dfe87ef55d (patch)
treeb20aead9b34d9bdba3243439dd8f0aed032727e2 /Source/cmState.cxx
parentacd8a73044e879286f0cfa24b54497a8307f204b (diff)
downloadCMake-1b2bb93302116a4791cf82e9cce028dfe87ef55d.zip
CMake-1b2bb93302116a4791cf82e9cce028dfe87ef55d.tar.gz
CMake-1b2bb93302116a4791cf82e9cce028dfe87ef55d.tar.bz2
Remove redundant c_str() calls.
Run clang-tidy's readability-redundant-string-cstr checker. Ignore findings in kwsys.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index b674b4e..09b11b2 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -965,7 +965,7 @@ void cmState::Directory::SetCurrentSource(std::string const& dir)
loc, this->DirectoryState->CurrentSourceDirectoryComponents);
this->ComputeRelativePathTopSource();
- this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc.c_str());
+ this->Snapshot_.SetDefinition("CMAKE_CURRENT_SOURCE_DIR", loc);
}
const char* cmState::Directory::GetCurrentBinary() const
@@ -984,7 +984,7 @@ void cmState::Directory::SetCurrentBinary(std::string const& dir)
loc, this->DirectoryState->CurrentBinaryDirectoryComponents);
this->ComputeRelativePathTopBinary();
- this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc.c_str());
+ this->Snapshot_.SetDefinition("CMAKE_CURRENT_BINARY_DIR", loc);
}
void cmState::Snapshot::SetListFile(const std::string& listfile)
@@ -1380,8 +1380,8 @@ void cmState::Snapshot::InitializeFromParent_ForSubdirsCommand()
this->SetDefinition("CMAKE_SOURCE_DIR", this->State->GetSourceDirectory());
this->SetDefinition("CMAKE_BINARY_DIR", this->State->GetBinaryDirectory());
- this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", currentSrcDir.c_str());
- this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir.c_str());
+ this->SetDefinition("CMAKE_CURRENT_SOURCE_DIR", currentSrcDir);
+ this->SetDefinition("CMAKE_CURRENT_BINARY_DIR", currentBinDir);
}
cmState::Directory::Directory(