[Cmake-commits] CMake branch, next, updated. v3.1.0-rc2-759-g3a78c6d

Brad King brad.king at kitware.com
Thu Nov 20 10:23:46 EST 2014


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  3a78c6d134e1abd1f456dd8802f6d9de3cf72199 (commit)
       via  32a191ce4bfb75765e9d5d5117d6fd6882c453d4 (commit)
      from  56993e7ab8fd7739bb4d5a57d5118f586a280f46 (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=3a78c6d134e1abd1f456dd8802f6d9de3cf72199
commit 3a78c6d134e1abd1f456dd8802f6d9de3cf72199
Merge: 56993e7 32a191c
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Nov 20 10:23:45 2014 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Nov 20 10:23:45 2014 -0500

    Merge topic 'cmTarget-null_ptr-everywhere' into next
    
    32a191ce cmTarget: Use null_ptr code path on all platforms


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=32a191ce4bfb75765e9d5d5117d6fd6882c453d4
commit 32a191ce4bfb75765e9d5d5117d6fd6882c453d4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Nov 20 10:19:17 2014 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Nov 20 10:22:07 2014 -0500

    cmTarget: Use null_ptr code path on all platforms
    
    This reduces conversions asked of the compiler.  Also drop 'static' from
    the declaration of the local null_ptr helper.

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ee62f06..4a5cc64 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -4798,11 +4798,7 @@ std::pair<bool, const char*> consistentNumberProperty(const char *lhs,
 {
   char *pEnd;
 
-#if defined(_MSC_VER)
-  static const char* const null_ptr = 0;
-#else
-# define null_ptr 0
-#endif
+  const char* const null_ptr = 0;
 
   long lnum = strtol(lhs, &pEnd, 0);
   if (pEnd == lhs || *pEnd != '\0' || errno == ERANGE)
@@ -4816,10 +4812,6 @@ std::pair<bool, const char*> consistentNumberProperty(const char *lhs,
     return std::pair<bool, const char*>(false, null_ptr);
     }
 
-#if !defined(_MSC_VER)
-#undef null_ptr
-#endif
-
   if (t == NumberMaxType)
     {
     return std::make_pair(true, cmMaximum(lnum, rnum) == lnum ? lhs : rhs);
@@ -4849,11 +4841,7 @@ std::pair<bool, const char*> consistentProperty(const char *lhs,
     return std::make_pair(true, lhs);
     }
 
-#if defined(_MSC_VER)
-  static const char* const null_ptr = 0;
-#else
-# define null_ptr 0
-#endif
+  const char* const null_ptr = 0;
 
   switch(t)
   {
@@ -4868,11 +4856,6 @@ std::pair<bool, const char*> consistentProperty(const char *lhs,
   }
   assert(!"Unreachable!");
   return std::pair<bool, const char*>(false, null_ptr);
-
-#if !defined(_MSC_VER)
-#undef null_ptr
-#endif
-
 }
 
 template<typename PropertyType>

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

Summary of changes:
 Source/cmTarget.cxx |   21 ++-------------------
 1 file changed, 2 insertions(+), 19 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list