[Cmake-commits] CMake branch, next, updated. v3.2.2-2842-g69ef42c

Stephen Kelly steveire at gmail.com
Sun May 17 07:26:46 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  69ef42c50a317ce1afdfbc51faa8f1ab8e6f3d0f (commit)
       via  3508f2c3fe8b66c7b4118272bf7baa1b7822eb11 (commit)
       via  5957fd1b7fbb2f7fcbc934ea9689d8b00bd814c7 (commit)
      from  ad38a97a95003ba2d3c96393594889d008b5b9bc (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=69ef42c50a317ce1afdfbc51faa8f1ab8e6f3d0f
commit 69ef42c50a317ce1afdfbc51faa8f1ab8e6f3d0f
Merge: ad38a97 3508f2c
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun May 17 07:26:45 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Sun May 17 07:26:45 2015 -0400

    Merge topic 'clean-up-cmMakefile' into next
    
    3508f2c3 cmMakefile: Use early return to reduce nested code.
    5957fd1b cmMakefile: Don't use else after return.


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3508f2c3fe8b66c7b4118272bf7baa1b7822eb11
commit 3508f2c3fe8b66c7b4118272bf7baa1b7822eb11
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:24:18 2015 +0200

    cmMakefile: Use early return to reduce nested code.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 8c08812..c28c4e5 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)
+        {
+        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)
         {
-        // 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
-          {
+        }
+      else
+        {
           parent->RemoveDefinition(var);
-          }
-        return true;
         }
-      return false;
+      return true;
       }
     // First localize the definition in the current scope.
     this->GetDefinition(var);

http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=5957fd1b7fbb2f7fcbc934ea9689d8b00bd814c7
commit 5957fd1b7fbb2f7fcbc934ea9689d8b00bd814c7
Author:     Stephen Kelly <steveire at gmail.com>
AuthorDate: Sun May 17 13:20:34 2015 +0200
Commit:     Stephen Kelly <steveire at gmail.com>
CommitDate: Sun May 17 13:23:06 2015 +0200

    cmMakefile: Don't use else after return.

diff --git a/Source/cmMakefile.cxx b/Source/cmMakefile.cxx
index 6280e38..8c08812 100644
--- a/Source/cmMakefile.cxx
+++ b/Source/cmMakefile.cxx
@@ -134,10 +134,7 @@ public:
           }
         return true;
         }
-      else
-        {
-        return false;
-        }
+      return false;
       }
     // First localize the definition in the current scope.
     this->GetDefinition(var);

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

Summary of changes:
 Source/cmMakefile.cxx |   26 ++++++++++++--------------
 1 file changed, 12 insertions(+), 14 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list