[Cmake-commits] CMake branch, next, updated. v3.2.2-2395-gc8dc264

Stephen Kelly steveire at gmail.com
Fri May 1 04:05:52 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  c8dc2648568e81c418c1a012dc6b2a59e8e260cb (commit)
       via  f76d78db21c68c651ba9cb3017d875cb3ed74f9e (commit)
       via  468c2c82ca4123ac9cceb095a91969fbedd63afc (commit)
       via  ecc1af22936bbe2a6dcd5b7ee8093b279bd3efc1 (commit)
      from  bfc051e9c4f64b44a145fb277e9877c8d7494441 (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=c8dc2648568e81c418c1a012dc6b2a59e8e260cb
commit c8dc2648568e81c418c1a012dc6b2a59e8e260cb
Merge: bfc051e f76d78d
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 1 04:05:51 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 1 04:05:51 2015 -0400

    Merge topic 'refactor-cmDefinitions-Get' into next
    
    f76d78db cmDefinitions: Make Get method static.
    468c2c82 cmDefinitions: Inline GetInternal method.
    ecc1af22 cmDefinitions: Remove obsolete NoDef object.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f76d78db21c68c651ba9cb3017d875cb3ed74f9e
commit f76d78db21c68c651ba9cb3017d875cb3ed74f9e
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 1 01:50:45 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri May 1 10:03:40 2015 +0200

    cmDefinitions: Make Get method static.

diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index cfcc000..ae42b8e 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -31,9 +31,9 @@ class cmDefinitions
 public:
   /** 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,
-                  std::list<cmDefinitions>::reverse_iterator rit,
-                  std::list<cmDefinitions>::reverse_iterator rend);
+  static const char* Get(const std::string& key,
+                         std::list<cmDefinitions>::reverse_iterator rit,
+                         std::list<cmDefinitions>::reverse_iterator rend);
 
   /** Set (or unset if null) a value associated with a key.  */
   void Set(const std::string& key, const char* value);
diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index b16d7e6..4ed2419 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -65,8 +65,8 @@ public:
 
   const char* GetDefinition(std::string const& name)
   {
-    return this->VarStack.back().Get(name, this->VarStack.rbegin(),
-                                     this->VarStack.rend());
+    return cmDefinitions::Get(name, this->VarStack.rbegin(),
+                                    this->VarStack.rend());
   }
 
   void SetDefinition(std::string const& name, std::string const& value)

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=468c2c82ca4123ac9cceb095a91969fbedd63afc
commit 468c2c82ca4123ac9cceb095a91969fbedd63afc
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 1 01:40:42 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri May 1 10:03:40 2015 +0200

    cmDefinitions: Inline GetInternal method.

diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 6f3a7c5..ff530d7 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -14,8 +14,7 @@
 #include <assert.h>
 
 //----------------------------------------------------------------------------
-cmDefinitions::Def const&
-cmDefinitions::GetInternal(const std::string& key,
+const char* cmDefinitions::Get(const std::string& key,
     std::list<cmDefinitions>::reverse_iterator rit,
     std::list<cmDefinitions>::reverse_iterator rend)
 {
@@ -39,16 +38,7 @@ cmDefinitions::GetInternal(const std::string& key,
     {
     i = rit->Map.insert(MapType::value_type(key, def)).first;
     }
-  return i->second;
-}
-
-//----------------------------------------------------------------------------
-const char* cmDefinitions::Get(const std::string& key,
-    std::list<cmDefinitions>::reverse_iterator rit,
-    std::list<cmDefinitions>::reverse_iterator rend)
-{
-  Def const& def = this->GetInternal(key, rit, rend);
-  return def.Exists? def.c_str() : 0;
+  return i->second.Exists ? i->second.c_str() : 0;
 }
 
 //----------------------------------------------------------------------------
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index d618911..cfcc000 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -72,11 +72,6 @@ private:
 #endif
   MapType Map;
 
-  // Internal query and update methods.
-  Def const& GetInternal(const std::string& key,
-                         std::list<cmDefinitions>::reverse_iterator rit,
-                         std::list<cmDefinitions>::reverse_iterator rend);
-
   void MakeClosure(std::set<std::string>& undefined,
                    std::list<cmDefinitions>::const_reverse_iterator rbegin,
                    std::list<cmDefinitions>::const_reverse_iterator rend);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=ecc1af22936bbe2a6dcd5b7ee8093b279bd3efc1
commit ecc1af22936bbe2a6dcd5b7ee8093b279bd3efc1
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 1 01:30:49 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri May 1 10:03:39 2015 +0200

    cmDefinitions: Remove obsolete NoDef object.

diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 1d0e108..6f3a7c5 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -14,9 +14,6 @@
 #include <assert.h>
 
 //----------------------------------------------------------------------------
-cmDefinitions::Def cmDefinitions::NoDef;
-
-//----------------------------------------------------------------------------
 cmDefinitions::Def const&
 cmDefinitions::GetInternal(const std::string& key,
     std::list<cmDefinitions>::reverse_iterator rit,
@@ -25,7 +22,7 @@ cmDefinitions::GetInternal(const std::string& key,
   std::list<cmDefinitions>::reverse_iterator rbegin = rit;
   assert(rit != rend);
   MapType::const_iterator i;
-  Def def = this->NoDef;
+  Def def;
   for ( ; rit != rend; ++rit)
     {
     i = rit->Map.find(key);
diff --git a/Source/cmDefinitions.h b/Source/cmDefinitions.h
index 8b78f2c..d618911 100644
--- a/Source/cmDefinitions.h
+++ b/Source/cmDefinitions.h
@@ -63,7 +63,6 @@ private:
     Def(Def const& d): std_string(d), Exists(d.Exists) {}
     bool Exists;
   };
-  static Def NoDef;
 
   // Local definitions, set or unset.
 #if defined(CMAKE_BUILD_WITH_CMAKE)

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list