From 9f03209ed73247a460ea0cd6ceadaa1e360e2a86 Mon Sep 17 00:00:00 2001 From: Nicolas Hake Date: Mon, 12 Oct 2015 15:43:12 +0200 Subject: [PATCH] Stop checking for nullptr We're already requiring the compiler to implement C++11, so checking for nullptr support again is useless. --- CMakeLists.txt | 1 - config.h.cmake | 3 --- src/platform/PlatformAbstraction.h | 2 -- 3 files changed, 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2c83bec2a..662ba839a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -71,7 +71,6 @@ if(USE_GCC_STD_0X) endif() REQUIRE_CXX_SOURCE_COMPILES("#include \nint main() { std::unique_ptr a; std::shared_ptr b; }" HAVE_C11_SMART_PTRS) -CHECK_CXX_SOURCE_COMPILES("int main() { void *d = nullptr; }" HAVE_NULLPTR) REQUIRE_CXX_SOURCE_COMPILES("int main() { static_assert(true, \"\"); }" HAVE_STATIC_ASSERT) CHECK_CXX_SOURCE_COMPILES("#include \nint main() { auto a = std::make_unique(0); }" HAVE_MAKE_UNIQUE) REQUIRE_CXX_SOURCE_COMPILES("template class C; int main() { return 0; }" HAVE_VARIADIC_TEMPLATES) diff --git a/config.h.cmake b/config.h.cmake index 1e57c7fe0..44a62b479 100644 --- a/config.h.cmake +++ b/config.h.cmake @@ -25,9 +25,6 @@ /* Define to 1 if your stdlib has std::make_unique */ #cmakedefine HAVE_MAKE_UNIQUE 1 -/* Define to 1 if you have support for nullptr. */ -#cmakedefine HAVE_NULLPTR 1 - /* Define to 1 if you have the header file. */ #cmakedefine HAVE_POLL_H 1 diff --git a/src/platform/PlatformAbstraction.h b/src/platform/PlatformAbstraction.h index 0eb0d4eb9..df3e4b098 100644 --- a/src/platform/PlatformAbstraction.h +++ b/src/platform/PlatformAbstraction.h @@ -74,10 +74,8 @@ // C++0x nullptr -#ifdef HAVE_NULLPTR #undef NULL #define NULL nullptr -#endif