From 2d044a67c932403b81fdde6f81d461c6e7c11efe Mon Sep 17 00:00:00 2001 From: Emmanuel Gil Peyrot Date: Sun, 21 Jun 2015 13:12:49 +0100 Subject: Common: Cleanup memory and misc includes. --- src/common/common_funcs.h | 4 ---- src/common/common_types.h | 2 -- src/common/logging/log.h | 4 ---- src/common/memory_util.cpp | 11 +++++++---- src/common/memory_util.h | 4 +--- src/common/misc.cpp | 5 +++-- src/common/swap.h | 10 +++++++--- src/core/file_sys/file_backend.h | 2 ++ src/core/memory.cpp | 3 --- src/core/memory.h | 2 ++ 10 files changed, 22 insertions(+), 25 deletions(-) (limited to 'src') diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h index 91b74c6b..cc74a228 100644 --- a/src/common/common_funcs.h +++ b/src/common/common_funcs.h @@ -5,8 +5,6 @@ #pragma once #include "common_types.h" -#include - #define b2(x) ( (x) | ( (x) >> 1) ) #define b4(x) ( b2(x) | ( b2(x) >> 2) ) @@ -43,8 +41,6 @@ #ifndef _MSC_VER -#include - #if defined(__x86_64__) || defined(_M_X64) #define Crash() __asm__ __volatile__("int $3") #elif defined(_M_ARM) diff --git a/src/common/common_types.h b/src/common/common_types.h index f6de0adf..ebfd7824 100644 --- a/src/common/common_types.h +++ b/src/common/common_types.h @@ -24,9 +24,7 @@ #pragma once -#include #include -#include #ifdef _MSC_VER #ifndef __func__ diff --git a/src/common/logging/log.h b/src/common/logging/log.h index 5b3a731e..e16dde7f 100644 --- a/src/common/logging/log.h +++ b/src/common/logging/log.h @@ -4,10 +4,6 @@ #pragma once -#include -#include -#include - #include "common/common_types.h" namespace Log { diff --git a/src/common/memory_util.cpp b/src/common/memory_util.cpp index 20b791a1..2b3ace52 100644 --- a/src/common/memory_util.cpp +++ b/src/common/memory_util.cpp @@ -3,14 +3,17 @@ // Refer to the license.txt file included. -#include "common/common_funcs.h" #include "common/logging/log.h" #include "common/memory_util.h" -#include "common/string_util.h" #ifdef _WIN32 -#include -#include + #include + #include + #include "common/common_funcs.h" + #include "common/string_util.h" +#else + #include + #include #endif #if !defined(_WIN32) && defined(__x86_64__) && !defined(MAP_32BIT) diff --git a/src/common/memory_util.h b/src/common/memory_util.h index 9fdbf1f1..9bf37c44 100644 --- a/src/common/memory_util.h +++ b/src/common/memory_util.h @@ -4,9 +4,7 @@ #pragma once -#ifndef _WIN32 -#include -#endif +#include #include void* AllocateExecutableMemory(size_t size, bool low = true); diff --git a/src/common/misc.cpp b/src/common/misc.cpp index 53cacf37..d2a049b6 100644 --- a/src/common/misc.cpp +++ b/src/common/misc.cpp @@ -2,12 +2,13 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "common/common_funcs.h" +#include #ifdef _WIN32 #include #else -#include +#include +#include #endif // Neither Android nor OS X support TLS diff --git a/src/common/swap.h b/src/common/swap.h index 588cebc7..b92e5bfa 100644 --- a/src/common/swap.h +++ b/src/common/swap.h @@ -17,12 +17,16 @@ #pragma once -#if defined(__linux__) -#include +#if defined(_MSC_VER) + #include +#elif defined(__linux__) + #include #elif defined(__FreeBSD__) -#include + #include #endif +#include "common/common_types.h" + // GCC 4.6+ #if __GNUC__ >= 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6) diff --git a/src/core/file_sys/file_backend.h b/src/core/file_sys/file_backend.h index 0fcff184..f5f72c72 100644 --- a/src/core/file_sys/file_backend.h +++ b/src/core/file_sys/file_backend.h @@ -4,6 +4,8 @@ #pragma once +#include + #include "common/common_types.h" //////////////////////////////////////////////////////////////////////////////////////////////////// diff --git a/src/core/memory.cpp b/src/core/memory.cpp index 28844a91..172ae905 100644 --- a/src/core/memory.cpp +++ b/src/core/memory.cpp @@ -9,9 +9,6 @@ #include "common/logging/log.h" #include "common/swap.h" -#include "core/hle/config_mem.h" -#include "core/hle/shared_page.h" -#include "core/hw/hw.h" #include "core/mem_map.h" #include "core/memory.h" #include "core/memory_setup.h" diff --git a/src/core/memory.h b/src/core/memory.h index 0b8ff9ec..418609de 100644 --- a/src/core/memory.h +++ b/src/core/memory.h @@ -4,6 +4,8 @@ #pragma once +#include + #include "common/common_types.h" namespace Memory { -- cgit v1.2.3