[Cmake-commits] CMake branch, next, updated. v3.2.2-2258-gdd4fb08

Stephen Kelly steveire at gmail.com
Tue Apr 28 18:27:23 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  dd4fb08a0bfc3179f8f7d1ff5c1e95a2101e04ac (commit)
       via  a3358faca1aba179ce6670460f259ab247b44cd4 (commit)
       via  23370344427ce8da470ff6266a675150457fdda2 (commit)
       via  b9f4dd39bb3878ef1fbb0b5b6bc23bab5425584d (commit)
      from  1102fd70366672c8e0f3842f095bebda5ccbc8e9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=dd4fb08a0bfc3179f8f7d1ff5c1e95a2101e04ac
commit dd4fb08a0bfc3179f8f7d1ff5c1e95a2101e04ac
Merge: 1102fd7 a3358fa
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Tue Apr 28 18:27:22 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Tue Apr 28 18:27:22 2015 -0400

    Merge topic 'clean-up-cmDefinitions' into next
    
    a3358fac cmDefinitions: Inline SetInternal method.
    23370344 cmDefinitions: Remove unused Set return value.
    b9f4dd39 cmDefinitions: Remove unused method.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=a3358faca1aba179ce6670460f259ab247b44cd4
commit a3358faca1aba179ce6670460f259ab247b44cd4
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun Apr 26 11:33:47 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Apr 29 00:18:13 2015 +0200

    cmDefinitions: Inline SetInternal method.

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;
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index 690df1f..83cd0d9 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -78,7 +78,6 @@ private:
 
   // Internal query and update methods.
   Def const& GetInternal(const std::string& key);
-  Def const& SetInternal(const std::string& key, Def const& def);
 
   // Implementation of Closure() method.
   struct ClosureTag {};

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=23370344427ce8da470ff6266a675150457fdda2
commit 23370344427ce8da470ff6266a675150457fdda2
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 25 16:29:54 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Apr 29 00:18:13 2015 +0200

    cmDefinitions: Remove unused Set return value.

diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 6a27659..d5f6ebc 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -45,13 +45,12 @@ cmDefinitions::SetInternal(const std::string& key, Def const& def)
   if(this->Up || def.Exists)
     {
     // In lower scopes we store keys, defined or not.
-    return (this->Map[key] = def);
+    this->Map[key] = def;
     }
   else
     {
     // In the top-most scope we need not store undefined keys.
     this->Map.erase(key);
-    return this->NoDef;
     }
 }
 
@@ -63,10 +62,9 @@ const char* cmDefinitions::Get(const std::string& key)
 }
 
 //----------------------------------------------------------------------------
-const char* cmDefinitions::Set(const std::string& key, const char* value)
+void cmDefinitions::Set(const std::string& key, const char* value)
 {
-  Def const& def = this->SetInternal(key, Def(value));
-  return def.Exists? def.c_str() : 0;
+  this->SetInternal(key, Def(value));
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index ab588ee..690df1f 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -38,7 +38,7 @@ public:
   const char* Get(const std::string& key);
 
   /** Set (or unset if null) a value associated with a key.  */
-  const char* Set(const std::string& key, const char* value);
+  void Set(const std::string& key, const char* value);
 
   /** Get the set of all local keys.  */
   std::set<std::string> LocalKeys() const;

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=b9f4dd39bb3878ef1fbb0b5b6bc23bab5425584d
commit b9f4dd39bb3878ef1fbb0b5b6bc23bab5425584d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sat Apr 25 15:59:25 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Wed Apr 29 00:17:38 2015 +0200

    cmDefinitions: Remove unused method.

diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index fe32dd5..6a27659 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -21,13 +21,6 @@ cmDefinitions::cmDefinitions(cmDefinitions* parent)
 }
 
 //----------------------------------------------------------------------------
-void cmDefinitions::Reset(cmDefinitions* parent)
-{
-  this->Up = parent;
-  this->Map.clear();
-}
-
-//----------------------------------------------------------------------------
 cmDefinitions::Def const&
 cmDefinitions::GetInternal(const std::string& key)
 {
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index a2f053f..ab588ee 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -30,9 +30,6 @@ public:
   /** Construct with the given parent scope.  */
   cmDefinitions(cmDefinitions* parent = 0);
 
-  /** Reset object as if newly constructed.  */
-  void Reset(cmDefinitions* parent = 0);
-
   /** Returns the parent scope, if any.  */
   cmDefinitions* GetParent() const { return this->Up; }
 

-----------------------------------------------------------------------

Summary of changes:
 Source/cmDefinitions.cxx |   35 ++++++++++-------------------------
 Source/cmDefinitions.h   |    6 +-----
 2 files changed, 11 insertions(+), 30 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list