summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2014-03-10 23:04:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2014-03-11 14:03:50 (GMT)
commit21c573f682f9eafbc8d4402f7febbb1bec1cb86a (patch)
tree8c9e0b913c7de5737a770430064ff5533a19477d /Source/cmExtraEclipseCDT4Generator.cxx
parente21ffaf8fe5499426604b4ebb9cd08798ee6107c (diff)
downloadCMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.zip
CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.gz
CMake-21c573f682f9eafbc8d4402f7febbb1bec1cb86a.tar.bz2
Remove some c_str() calls.
Use the clang RemoveCStrCalls tool to automatically migrate the code. This was only run on linux, so does not have any positive or negative effect on other platforms.
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 4aabc7e..d02e54d 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -205,7 +205,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
std::string cacheEntryName = "CMAKE_ECLIPSE_ENVVAR_";
cacheEntryName += envVar;
const char* cacheValue = mf->GetCacheManager()->GetCacheValue(
- cacheEntryName.c_str());
+ cacheEntryName);
// now we have both, decide which one to use
std::string valueToUse;
@@ -219,7 +219,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
// The variable is in the env, but not in the cache. Use it and put it
// in the cache
valueToUse = envVarValue;
- mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
+ mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
cacheEntryName.c_str(), cmCacheManager::STRING,
true);
mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
@@ -240,7 +240,7 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(cmGeneratedFileStream& fout,
if (valueToUse.find(envVarValue) == std::string::npos)
{
valueToUse = envVarValue;
- mf->AddCacheDefinition(cacheEntryName.c_str(), valueToUse.c_str(),
+ mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
cacheEntryName.c_str(), cmCacheManager::STRING,
true);
mf->GetCacheManager()->SaveCache(mf->GetHomeOutputDirectory());
@@ -981,7 +981,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
std::string systemIncludeDirs = mf->GetSafeDefinition(
"CMAKE_EXTRA_GENERATOR_C_SYSTEM_INCLUDE_DIRS");
std::vector<std::string> dirs;
- cmSystemTools::ExpandListArgument(systemIncludeDirs.c_str(), dirs);
+ cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
this->AppendIncludeDirectories(fout, dirs, emmited);
}
compiler = mf->GetSafeDefinition("CMAKE_CXX_COMPILER");
@@ -990,7 +990,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
std::string systemIncludeDirs = mf->GetSafeDefinition(
"CMAKE_EXTRA_GENERATOR_CXX_SYSTEM_INCLUDE_DIRS");
std::vector<std::string> dirs;
- cmSystemTools::ExpandListArgument(systemIncludeDirs.c_str(), dirs);
+ cmSystemTools::ExpandListArgument(systemIncludeDirs, dirs);
this->AppendIncludeDirectories(fout, dirs, emmited);
}