From a4430933e960ec0fc180af83267dd27664f28d53 Mon Sep 17 00:00:00 2001 From: Nicholas Ormrod Date: Fri, 26 Aug 2016 11:41:38 -0700 Subject: [PATCH] Remove now-useless FOLLY_MALLOC_H_ Summary: Malloc.h is intentionally included multiple times, once from folly and once from libstdc++. The current ###pragma once## implicitly allows this to happen. FBString.h has an undef for Malloc.h's include guard, which originally accomplished this goal. The undefing code is presently moot, since its functionality has been replaced by ###pragma once##. Remove it. I noticed this when ott was copying FBString over to libstdc++ in D3757853. The diff that switched the include guards to pragmas was a codemod, and was not specific to fbstring. D3054492 Reviewed By: ot Differential Revision: D3758119 fbshipit-source-id: e796d039a031d5f842ed39bf55a6b1aeb2686bc4 --- folly/FBString.h | 10 +--------- folly/Malloc.h | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) diff --git a/folly/FBString.h b/folly/FBString.h index bc5790ae..d02d12e2 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -37,15 +37,7 @@ #define FOLLY_DEFINED_NDEBUG_FOR_FBSTRING #endif // NDEBUG -// Handle the cases where the fbcode version (folly/Malloc.h) is included -// either before or after this inclusion. -#ifdef FOLLY_MALLOC_H_ -#undef FOLLY_MALLOC_H_ -#include "basic_fbstring_malloc.h" // nolint -#else -#include "basic_fbstring_malloc.h" // nolint -#undef FOLLY_MALLOC_H_ -#endif +#include "basic_fbstring_malloc.h" #else // !_LIBSTDCXX_FBSTRING diff --git a/folly/Malloc.h b/folly/Malloc.h index fec188f5..8092ab0b 100644 --- a/folly/Malloc.h +++ b/folly/Malloc.h @@ -18,7 +18,6 @@ // http://www.canonware.com/download/jemalloc/jemalloc-latest/doc/jemalloc.html #pragma once -#define FOLLY_MALLOC_H_ /** * Define various MALLOCX_* macros normally provided by jemalloc. We define -- 2.34.1