diff options
author | Stephen Kelly <steveire@gmail.com> | 2015-05-17 14:19:55 (GMT) |
---|---|---|
committer | Stephen Kelly <steveire@gmail.com> | 2015-05-19 20:36:53 (GMT) |
commit | b9f9915516c9b426f4f528bb1ec5a79d115e21ab (patch) | |
tree | 5d98678c6cd4a92171909c14883d623decf39c30 /Source/cmDefinitions.h | |
parent | 2b09d9f346bd3220b059771a6da1bafb06ce0f5b (diff) | |
download | CMake-b9f9915516c9b426f4f528bb1ec5a79d115e21ab.zip CMake-b9f9915516c9b426f4f528bb1ec5a79d115e21ab.tar.gz CMake-b9f9915516c9b426f4f528bb1ec5a79d115e21ab.tar.bz2 |
cmMakefile: Remove VarUsageStack.
Store usage information in the cmDefintions value instead. We already
pay for the memory as padding in the Def struct, so we might as well
use it.
Diffstat (limited to 'Source/cmDefinitions.h')
-rw-r--r-- | Source/cmDefinitions.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h index bd3d392..5fdcaab 100644 --- a/Source/cmDefinitions.h +++ b/Source/cmDefinitions.h @@ -46,8 +46,7 @@ public: /** Set (or unset if null) a value associated with a key. */ void Set(const std::string& key, const char* value); - /** Get the set of all local keys. */ - std::vector<std::string> LocalKeys() const; + std::vector<std::string> UnusedKeys() const; static std::vector<std::string> ClosureKeys(StackConstIter begin, StackConstIter end); @@ -61,11 +60,16 @@ private: private: typedef std::string std_string; public: - Def(): std_string(), Exists(false) {} - Def(const char* v): std_string(v?v:""), Exists(v?true:false) {} - Def(const std_string& v): std_string(v), Exists(true) {} - Def(Def const& d): std_string(d), Exists(d.Exists) {} + Def(): std_string(), Exists(false), Used(false) {} + Def(const char* v) + : std_string(v ? v : ""), + Exists(v ? true : false), + Used(false) + {} + Def(const std_string& v): std_string(v), Exists(true), Used(false) {} + Def(Def const& d): std_string(d), Exists(d.Exists), Used(d.Used) {} bool Exists; + bool Used; }; static Def NoDef; |