summaryrefslogtreecommitdiffstats
path: root/Source/cmMakefile.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-05-04 15:02:21 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-05-04 15:02:21 (GMT)
commit1ef88dcd46da72e489204141d66509f484738e1b (patch)
tree5bf06bca9c1728a22deb92fa994b89ba8de09ec5 /Source/cmMakefile.cxx
parent8403c8da2c54affb0ab185aaaf302c7fa7ade914 (diff)
parent6c7dad41d9f5e9b6ab6bdd6ddee837aa5509e19e (diff)
downloadCMake-1ef88dcd46da72e489204141d66509f484738e1b.zip
CMake-1ef88dcd46da72e489204141d66509f484738e1b.tar.gz
CMake-1ef88dcd46da72e489204141d66509f484738e1b.tar.bz2
Merge topic 'refactor-cmDefinitions-Get'
6c7dad41 cmDefinitions: Make Get method static. a7ce0c7b cmDefinitions: Make GetInternal method static. 7a5039fa cmDefinitions: Use static member without this->. 191573f7 cmDefinitions: Remove Parent pointer. 8b1745a1 cmDefinitions: Accept varStack iterators in Get API.
Diffstat (limited to 'Source/cmMakefile.cxx')
-rw-r--r--Source/cmMakefile.cxx10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 5686b1b..4ed2419 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -53,12 +53,7 @@ public:
void PushDefinitions()
{
- cmDefinitions* parent = 0;
- if (!this->VarStack.empty())
- {
- parent = &this->VarStack.back();
- }
- this->VarStack.push_back(cmDefinitions(parent));
+ this->VarStack.push_back(cmDefinitions());
}
void InitializeDefinitions(cmMakefile* parent)
@@ -70,7 +65,8 @@ public:
const char* GetDefinition(std::string const& name)
{
- return this->VarStack.back().Get(name);
+ return cmDefinitions::Get(name, this->VarStack.rbegin(),
+ this->VarStack.rend());
}
void SetDefinition(std::string const& name, std::string const& value)