[Cmake-commits] CMake branch, next, updated. v3.2.2-2853-g3b76090

Stephen Kelly steveire at gmail.com
Sun May 17 07:37:07 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  3b76090414c5fb960f738ee0cb7ede0e1a47e3ef (commit)
       via  f07c7effa5c1888374a90181c5e303828bc70760 (commit)
      from  a4a8e7366fafb1c8feaca598c7180ff1df15b5d2 (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=3b76090414c5fb960f738ee0cb7ede0e1a47e3ef
commit 3b76090414c5fb960f738ee0cb7ede0e1a47e3ef
Merge: a4a8e73 f07c7ef
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun May 17 07:37:06 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun May 17 07:37:06 2015 -0400

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


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=f07c7effa5c1888374a90181c5e303828bc70760
commit f07c7effa5c1888374a90181c5e303828bc70760
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:36:55 2015 +0200

    cmMakefile: Use early return to reduce nested code.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8c08812..4ee0948 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