summaryrefslogtreecommitdiffstats
path: root/Source/cmExtraEclipseCDT4Generator.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmExtraEclipseCDT4Generator.cxx')
-rw-r--r--Source/cmExtraEclipseCDT4Generator.cxx15
1 files changed, 8 insertions, 7 deletions
diff --git a/Source/cmExtraEclipseCDT4Generator.cxx b/Source/cmExtraEclipseCDT4Generator.cxx
index 2a6ce98..684d1f5 100644
--- a/Source/cmExtraEclipseCDT4Generator.cxx
+++ b/Source/cmExtraEclipseCDT4Generator.cxx
@@ -222,17 +222,17 @@ void cmExtraEclipseCDT4Generator::AddEnvVar(std::ostream& out,
// now we have both, decide which one to use
std::string valueToUse;
- if (!envVarSet && cacheValue == CM_NULLPTR) {
+ if (!envVarSet && cacheValue == nullptr) {
// nothing known, do nothing
valueToUse = "";
- } else if (envVarSet && cacheValue == CM_NULLPTR) {
+ } else if (envVarSet && cacheValue == nullptr) {
// The variable is in the env, but not in the cache. Use it and put it
// in the cache
valueToUse = envVarValue;
mf->AddCacheDefinition(cacheEntryName, valueToUse.c_str(),
cacheEntryName.c_str(), cmStateEnums::STRING, true);
mf->GetCMakeInstance()->SaveCache(lg->GetBinaryDirectory());
- } else if (!envVarSet && cacheValue != CM_NULLPTR) {
+ } else if (!envVarSet && cacheValue != nullptr) {
// It is already in the cache, but not in the env, so use it from the cache
valueToUse = cacheValue;
} else {
@@ -475,7 +475,7 @@ void cmExtraEclipseCDT4Generator::CreateLinksForTargets(cmXMLWriter& xml)
this->GlobalGenerator->GetLocalGenerators().begin();
lgIt != this->GlobalGenerator->GetLocalGenerators().end(); ++lgIt) {
cmMakefile* makefile = (*lgIt)->GetMakefile();
- const std::vector<cmGeneratorTarget*> targets =
+ const std::vector<cmGeneratorTarget*>& targets =
(*lgIt)->GetGeneratorTargets();
for (std::vector<cmGeneratorTarget*>::const_iterator ti = targets.begin();
@@ -853,8 +853,9 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
for (std::vector<cmLocalGenerator*>::const_iterator it =
this->GlobalGenerator->GetLocalGenerators().begin();
it != this->GlobalGenerator->GetLocalGenerators().end(); ++it) {
- std::vector<cmGeneratorTarget*> targets = (*it)->GetGeneratorTargets();
- for (std::vector<cmGeneratorTarget*>::iterator l = targets.begin();
+ const std::vector<cmGeneratorTarget*>& targets =
+ (*it)->GetGeneratorTargets();
+ for (std::vector<cmGeneratorTarget*>::const_iterator l = targets.begin();
l != targets.end(); ++l) {
std::vector<std::string> includeDirs;
std::string config = mf->GetSafeDefinition("CMAKE_BUILD_TYPE");
@@ -910,7 +911,7 @@ void cmExtraEclipseCDT4Generator::CreateCProjectFile() const
for (std::vector<cmLocalGenerator*>::const_iterator it =
this->GlobalGenerator->GetLocalGenerators().begin();
it != this->GlobalGenerator->GetLocalGenerators().end(); ++it) {
- const std::vector<cmGeneratorTarget*> targets =
+ const std::vector<cmGeneratorTarget*>& targets =
(*it)->GetGeneratorTargets();
std::string subdir = (*it)->ConvertToRelativePath(
this->HomeOutputDirectory, (*it)->GetCurrentBinaryDirectory());