cmDefinitions: Remove Parent pointer.
All structural knowledge of the stack of scopes is now external.
This commit is contained in:
parent
8b1745a1c5
commit
191573f792
|
@ -16,12 +16,6 @@
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmDefinitions::Def cmDefinitions::NoDef;
|
cmDefinitions::Def cmDefinitions::NoDef;
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
|
||||||
cmDefinitions::cmDefinitions(cmDefinitions* parent)
|
|
||||||
: Up(parent)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
|
|
||||||
//----------------------------------------------------------------------------
|
//----------------------------------------------------------------------------
|
||||||
cmDefinitions::Def const& cmDefinitions::GetInternal(
|
cmDefinitions::Def const& cmDefinitions::GetInternal(
|
||||||
const std::string& key,
|
const std::string& key,
|
||||||
|
|
|
@ -29,12 +29,6 @@
|
||||||
class cmDefinitions
|
class cmDefinitions
|
||||||
{
|
{
|
||||||
public:
|
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.
|
/** Get the value associated with a key; null if none.
|
||||||
Store the result locally if it came from a parent. */
|
Store the result locally if it came from a parent. */
|
||||||
const char* Get(const std::string& key,
|
const char* Get(const std::string& key,
|
||||||
|
@ -71,9 +65,6 @@ private:
|
||||||
};
|
};
|
||||||
static Def NoDef;
|
static Def NoDef;
|
||||||
|
|
||||||
// Parent scope, if any.
|
|
||||||
cmDefinitions* Up;
|
|
||||||
|
|
||||||
// Local definitions, set or unset.
|
// Local definitions, set or unset.
|
||||||
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
#if defined(CMAKE_BUILD_WITH_CMAKE)
|
||||||
typedef cmsys::hash_map<std::string, Def> MapType;
|
typedef cmsys::hash_map<std::string, Def> MapType;
|
||||||
|
|
|
@ -53,12 +53,7 @@ public:
|
||||||
|
|
||||||
void PushDefinitions()
|
void PushDefinitions()
|
||||||
{
|
{
|
||||||
cmDefinitions* parent = 0;
|
this->VarStack.push_back(cmDefinitions());
|
||||||
if (!this->VarStack.empty())
|
|
||||||
{
|
|
||||||
parent = &this->VarStack.back();
|
|
||||||
}
|
|
||||||
this->VarStack.push_back(cmDefinitions(parent));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void InitializeDefinitions(cmMakefile* parent)
|
void InitializeDefinitions(cmMakefile* parent)
|
||||||
|
|
Loading…
Reference in New Issue