[Cmake-commits] CMake branch, next, updated. v3.2.2-2857-g6e17764

Stephen Kelly steveire at gmail.com
Sun May 17 07:45:08 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  6e17764a2f4ecbf2c0e72712f1e38a4dc8e74116 (commit)
       via  073f474790cc34b3953c69aa052003fd9f6714ae (commit)
      from  ff6232c9e2a43649daec4de8b10b0e22746f2d19 (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=6e17764a2f4ecbf2c0e72712f1e38a4dc8e74116
commit 6e17764a2f4ecbf2c0e72712f1e38a4dc8e74116
Merge: ff6232c 073f474
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun May 17 07:45:07 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun May 17 07:45:07 2015 -0400

    Merge topic 'clean-up-cmMakefile' into next
    
    073f4747 cmMakefile: Use early return to reduce nested code.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=073f474790cc34b3953c69aa052003fd9f6714ae
commit 073f474790cc34b3953c69aa052003fd9f6714ae
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun May 17 13:24:18 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun May 17 13:44:46 2015 +0200

    cmMakefile: Use early return to reduce nested code.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8c08812..6fbddb7 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -118,23 +118,24 @@ public:
     ++it;
     if(it == this->VarStack.rend())
       {
-      if(cmLocalGenerator* plg = mf->GetLocalGenerator()->GetParent())
+      cmLocalGenerator* plg = mf->GetLocalGenerator()->GetParent();
+      if(!plg)
         {
-        // Update the definition in the parent directory top scope.  This
-        // directory's scope was initialized by the closure of the parent
-        // scope, so we do not need to localize the definition first.
-        cmMakefile* parent = plg->GetMakefile();
-        if (varDef)
-          {
-          parent->AddDefinition(var, varDef);
-          }
-        else
-          {
-          parent->RemoveDefinition(var);
-          }
-        return true;
+        return false;
         }
-      return false;
+      // Update the definition in the parent directory top scope.  This
+      // directory's scope was initialized by the closure of the parent
+      // scope, so we do not need to localize the definition first.
+      cmMakefile* parent = plg->GetMakefile();
+      if (varDef)
+        {
+        parent->AddDefinition(var, varDef);
+        }
+      else
+        {
+        parent->RemoveDefinition(var);
+        }
+      return true;
       }
     // First localize the definition in the current scope.
     this->GetDefinition(var);

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

Summary of changes:


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list