summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBill Hoffman <bill.hoffman@kitware.com>2001-08-27 18:44:15 (GMT)
committerBill Hoffman <bill.hoffman@kitware.com>2001-08-27 18:44:15 (GMT)
commitf709e5588eaae694c7b1203580da0b5487b9ef73 (patch)
tree92f04bc50327357323b50d736e67f94b83ca98fb /Source/cmMakefile.cxx
parent2858689d6dfe55e86b9fdb399f3d1f1f59c78b28 (diff)
downloadCMake-f709e5588eaae694c7b1203580da0b5487b9ef73.zip
CMake-f709e5588eaae694c7b1203580da0b5487b9ef73.tar.gz
CMake-f709e5588eaae694c7b1203580da0b5487b9ef73.tar.bz2
ENH: change expand variables to use GetDefinition
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx12
1 files changed, 6 insertions, 6 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index a54b78a..3eb2d61 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -787,9 +787,9 @@ bool cmMakefile::IsOn(const char* name)
return cmSystemTools::IsOn(value);
}
-const char* cmMakefile::GetDefinition(const char* name)
+const char* cmMakefile::GetDefinition(const char* name) const
{
- DefinitionMap::iterator pos = m_Definitions.find(name);
+ DefinitionMap::const_iterator pos = m_Definitions.find(name);
if(pos != m_Definitions.end())
{
return (*pos).second.c_str();
@@ -929,16 +929,16 @@ void cmMakefile::ExpandVariablesInString(std::string& source,
}
else
{
- DefinitionMap::const_iterator pos = m_Definitions.find(var.c_str());
- if(pos != m_Definitions.end())
+ const char* lookup = this->GetDefinition(var.c_str());
+ if(lookup)
{
if (escapeQuotes)
{
- result += cmSystemTools::EscapeQuotes((*pos).second.c_str());
+ result += cmSystemTools::EscapeQuotes(lookup);
}
else
{
- result += (*pos).second;
+ result += lookup;
}
found = true;
}