summaryrefslogtreecommitdiffstats
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2016-05-27 13:08:18 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2016-05-27 13:08:18 (GMT)
commit82c286393afb15346431a8a3f601819698fcb87f (patch)
tree06f8377ed39ad9d8a26ae2d58aed03f0e6c05baa /Source/cmState.cxx
parent07983bcbfa5e469bfdffbad6f670e68a87760792 (diff)
parent1b2bb93302116a4791cf82e9cce028dfe87ef55d (diff)
downloadCMake-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.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(