summaryrefslogtreecommitdiff
path: root/Source/cmState.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmState.cxx')
-rw-r--r--Source/cmState.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmState.cxx b/Source/cmState.cxx
index 00d7e9a254..bb891b5792 100644
--- a/Source/cmState.cxx
+++ b/Source/cmState.cxx
@@ -93,7 +93,7 @@ cmStateEnums::CacheEntryType cmState::StringToCacheEntryType(const char* s)
bool cmState::IsCacheEntryType(std::string const& key)
{
for (int i = 0; cmCacheEntryTypes[i]; ++i) {
- if (strcmp(key.c_str(), cmCacheEntryTypes[i]) == 0) {
+ if (key == cmCacheEntryTypes[i]) {
return true;
}
}
@@ -514,9 +514,9 @@ void cmState::SetSourceDirectory(std::string const& sourceDirectory)
cmSystemTools::ConvertToUnixSlashes(this->SourceDirectory);
}
-const char* cmState::GetSourceDirectory() const
+std::string const& cmState::GetSourceDirectory() const
{
- return this->SourceDirectory.c_str();
+ return this->SourceDirectory;
}
void cmState::SetBinaryDirectory(std::string const& binaryDirectory)
@@ -595,9 +595,9 @@ unsigned int cmState::GetCacheMinorVersion() const
return this->CacheManager->GetCacheMinorVersion();
}
-const char* cmState::GetBinaryDirectory() const
+std::string const& cmState::GetBinaryDirectory() const
{
- return this->BinaryDirectory.c_str();
+ return this->BinaryDirectory;
}
cmStateSnapshot cmState::CreateBaseSnapshot()