From f95e1639a4b4ae07d9223e0fccf5854657b456eb Mon Sep 17 00:00:00 2001 From: Temirkhan Myrzamadi Date: Tue, 25 Jun 2019 16:59:36 +0600 Subject: [PATCH] Eliminate '#ifndef' guards Related to https://github.com/microsoft/mimalloc/issues/40 --- include/mimalloc-atomic.h | 4 ---- include/mimalloc-internal.h | 5 ----- include/mimalloc-types.h | 4 ---- include/mimalloc.h | 4 ---- 4 files changed, 17 deletions(-) diff --git a/include/mimalloc-atomic.h b/include/mimalloc-atomic.h index 55b11f7a..f3c88a5f 100644 --- a/include/mimalloc-atomic.h +++ b/include/mimalloc-atomic.h @@ -5,8 +5,6 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef __MIMALLOC_ATOMIC_H -#define __MIMALLOC_ATOMIC_H // ------------------------------------------------------ // Atomics @@ -172,5 +170,3 @@ static inline uintptr_t mi_atomic_exchange(volatile uintptr_t* p, uintptr_t exch #endif #endif - -#endif // __MIMALLOC_ATOMIC_H diff --git a/include/mimalloc-internal.h b/include/mimalloc-internal.h index 1d08b685..37400869 100644 --- a/include/mimalloc-internal.h +++ b/include/mimalloc-internal.h @@ -5,8 +5,6 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef __MIMALLOC_INTERNAL_H -#define __MIMALLOC_INTERNAL_H #include "mimalloc-types.h" @@ -317,6 +315,3 @@ static inline uintptr_t _mi_thread_id() mi_attr_noexcept { return (uintptr_t)&_mi_heap_default; } #endif - - -#endif diff --git a/include/mimalloc-types.h b/include/mimalloc-types.h index c660897e..ec580def 100644 --- a/include/mimalloc-types.h +++ b/include/mimalloc-types.h @@ -5,8 +5,6 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef __MIMALLOC_TYPES_H -#define __MIMALLOC_TYPES_H #include // size_t etc. #include // ptrdiff_t @@ -395,5 +393,3 @@ struct mi_tld_s { mi_os_tld_t os; // os tld mi_stats_t stats; // statistics }; - -#endif diff --git a/include/mimalloc.h b/include/mimalloc.h index e88d9712..99fa7b1c 100644 --- a/include/mimalloc.h +++ b/include/mimalloc.h @@ -5,8 +5,6 @@ terms of the MIT license. A copy of the license can be found in the file "LICENSE" at the root of this distribution. -----------------------------------------------------------------------------*/ #pragma once -#ifndef __MIMALLOC_H -#define __MIMALLOC_H #define MI_MALLOC_VERSION 100 // major + 2 digits minor @@ -233,5 +231,3 @@ mi_decl_export void mi_option_set_default(mi_option_t option, long value); #ifdef __cplusplus } #endif - -#endif