[Cmake-commits] CMake branch, next, updated. v3.2.2-2391-gbfc051e

Stephen Kelly steveire at gmail.com
Fri May 1 04:04:50 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  bfc051e9c4f64b44a145fb277e9877c8d7494441 (commit)
       via  5cdda25d677ef502a4e716360888fa52a3ca826b (commit)
      from  0243760567b7e05c08e3dd8852b2e6d9152dd7af (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=bfc051e9c4f64b44a145fb277e9877c8d7494441
commit bfc051e9c4f64b44a145fb277e9877c8d7494441
Merge: 0243760 5cdda25
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 1 04:04:49 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri May 1 04:04:49 2015 -0400

    Merge topic 'refactor-cmDefinitions-Get' into next
    
    5cdda25d Revert "cmDefinitions: Simplify creation of intermediate scope values."


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5cdda25d677ef502a4e716360888fa52a3ca826b
commit 5cdda25d677ef502a4e716360888fa52a3ca826b
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Fri May 1 09:55:40 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Fri May 1 09:56:43 2015 +0200

    Revert "cmDefinitions: Simplify creation of intermediate scope values."
    
    This reverts commit c593ae71a3efe7c5fed08d16b0be46b114696e6d.

diff --git a/Source/cmDefinitions.cxx b/Source/cmDefinitions.cxx
index 9117d0a..ff530d7 100644
--- a/Source/cmDefinitions.cxx
+++ b/Source/cmDefinitions.cxx
@@ -21,11 +21,13 @@ const char* cmDefinitions::Get(const std::string& key,
   std::list<cmDefinitions>::reverse_iterator rbegin = rit;
   assert(rit != rend);
   MapType::const_iterator i;
+  Def def;
   for ( ; rit != rend; ++rit)
     {
     i = rit->Map.find(key);
     if(i != rit->Map.end())
       {
+      def = i->second;
       break;
       }
     }
@@ -34,8 +36,7 @@ const char* cmDefinitions::Get(const std::string& key,
   // Store the result in intermediate scopes.
   for (rit = rbegin; rit != last; ++rit)
     {
-    i = rit->Map.insert(MapType::value_type(
-         key, Def(i != rit->Map.end() ? i->second : 0))).first;
+    i = rit->Map.insert(MapType::value_type(key, def)).first;
     }
   return i->second.Exists ? i->second.c_str() : 0;
 }

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

Summary of changes:
 Source/cmDefinitions.cxx |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list