summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-26 14:19:11 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-05-01 17:34:59 (GMT)
commit191573f7922aea3c1abdba325f5e65e4ba03d7c8 (patch)
treecfd1cc1e61f8e3a16cf17b6e4fb143b62a14a9f2
parent8b1745a1c5ed992e632bd4865c0f6a34b136041d (diff)
downloadCMake-191573f7922aea3c1abdba325f5e65e4ba03d7c8.zip
CMake-191573f7922aea3c1abdba325f5e65e4ba03d7c8.tar.gz
CMake-191573f7922aea3c1abdba325f5e65e4ba03d7c8.tar.bz2
cmDefinitions: Remove Parent pointer.
All structural knowledge of the stack of scopes is now external.
-rw-r--r--Source/cmDefinitions.cxx6
-rw-r--r--Source/cmDefinitions.h9
-rw-r--r--Source/cmMakefile.cxx7
3 files changed, 1 insertions, 21 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 94d27c2..6e26656 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -17,12 +17,6 @@
cmDefinitions::Def cmDefinitions::NoDef;
//----------------------------------------------------------------------------
-cmDefinitions::cmDefinitions(cmDefinitions* parent)
- : Up(parent)
-{
-}
-
-//----------------------------------------------------------------------------
cmDefinitions::Def const& cmDefinitions::GetInternal(
const std::string& key,
std::list<cmDefinitions>::reverse_iterator rbegin,
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index 2bcfcb0..33f468b 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -29,12 +29,6 @@
class cmDefinitions
{
public:
- /** Construct with the given parent scope. */
- cmDefinitions(cmDefinitions* parent = 0);
-
- /** Returns the parent scope, if any. */
- cmDefinitions* GetParent() const { return this->Up; }
-
/** Get the value associated with a key; null if none.
Store the result locally if it came from a parent. */
const char* Get(const std::string& key,
@@ -71,9 +65,6 @@ private:
};
static Def NoDef;
- // Parent scope, if any.
- cmDefinitions* Up;
-
// Local definitions, set or unset.
#if defined(CMAKE_BUILD_WITH_CMAKE)
typedef cmsys::hash_map<std::string, Def> MapType;
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index ae7e564..b16d7e6 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)