diff options
author | Brad King <brad.king@kitware.com> | 2016-05-27 13:08:18 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2016-05-27 13:08:18 (GMT) |
commit | 82c286393afb15346431a8a3f601819698fcb87f (patch) | |
tree | 06f8377ed39ad9d8a26ae2d58aed03f0e6c05baa /Source/cmState.cxx | |
parent | 07983bcbfa5e469bfdffbad6f670e68a87760792 (diff) | |
parent | 1b2bb93302116a4791cf82e9cce028dfe87ef55d (diff) | |
download | CMake-82c286393afb15346431a8a3f601819698fcb87f.zip CMake-82c286393afb15346431a8a3f601819698fcb87f.tar.gz CMake-82c286393afb15346431a8a3f601819698fcb87f.tar.bz2 |
Merge topic 'remove-needless-c_str'
1b2bb933 Remove redundant c_str() calls.
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r-- | Source/cmState.cxx | 8 |
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( |