summaryrefslogtreecommitdiffstats
path: root/Source/cmDefinitions.cxx
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2015-04-26 09:33:47 (GMT)
committerStephen Kelly <steveire@gmail.com>2015-04-28 22:18:13 (GMT)
commita3358faca1aba179ce6670460f259ab247b44cd4 (patch)
tree417b9ea346af846091998a6c1f5a9c2cf6d0dd87 /Source/cmDefinitions.cxx
parent23370344427ce8da470ff6266a675150457fdda2 (diff)
downloadCMake-a3358faca1aba179ce6670460f259ab247b44cd4.zip
CMake-a3358faca1aba179ce6670460f259ab247b44cd4.tar.gz
CMake-a3358faca1aba179ce6670460f259ab247b44cd4.tar.bz2
cmDefinitions: Inline SetInternal method.
Diffstat (limited to 'Source/cmDefinitions.cxx')
-rw-r--r--Source/cmDefinitions.cxx24
1 files changed, 9 insertions, 15 deletions
diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index d5f6ebc..abb46b3 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -39,9 +39,16 @@ cmDefinitions::GetInternal(const std::string& key)
}
//----------------------------------------------------------------------------
-cmDefinitions::Def const&
-cmDefinitions::SetInternal(const std::string& key, Def const& def)
+const char* cmDefinitions::Get(const std::string& key)
{
+ Def const& def = this->GetInternal(key);
+ return def.Exists? def.c_str() : 0;
+}
+
+//----------------------------------------------------------------------------
+void cmDefinitions::Set(const std::string& key, const char* value)
+{
+ Def def(value);
if(this->Up || def.Exists)
{
// In lower scopes we store keys, defined or not.
@@ -55,19 +62,6 @@ cmDefinitions::SetInternal(const std::string& key, Def const& def)
}
//----------------------------------------------------------------------------
-const char* cmDefinitions::Get(const std::string& key)
-{
- Def const& def = this->GetInternal(key);
- return def.Exists? def.c_str() : 0;
-}
-
-//----------------------------------------------------------------------------
-void cmDefinitions::Set(const std::string& key, const char* value)
-{
- this->SetInternal(key, Def(value));
-}
-
-//----------------------------------------------------------------------------
std::set<std::string> cmDefinitions::LocalKeys() const
{
std::set<std::string> keys;