diff options
author | Brad King <brad.king@kitware.com> | 2014-11-25 15:18:35 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2014-11-25 15:18:35 (GMT) |
commit | ce64e3607f0bccb4b1239d28510c92bc264904ea (patch) | |
tree | da630bcaca0d9b1fb989ac234dc8c04e3d53157d /Source | |
parent | 0ff35425d7d26c3c5448d4232e32a14d43395e86 (diff) | |
parent | 32a191ce4bfb75765e9d5d5117d6fd6882c453d4 (diff) | |
download | CMake-ce64e3607f0bccb4b1239d28510c92bc264904ea.zip CMake-ce64e3607f0bccb4b1239d28510c92bc264904ea.tar.gz CMake-ce64e3607f0bccb4b1239d28510c92bc264904ea.tar.bz2 |
Merge topic 'cmTarget-null_ptr-everywhere'
32a191ce cmTarget: Use null_ptr code path on all platforms
Diffstat (limited to 'Source')
-rw-r--r-- | Source/cmTarget.cxx | 21 |
1 files changed, 2 insertions, 19 deletions
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> |