diff --git a/Source/Core/AudioCommon/Src/AOSoundStream.h b/Source/Core/AudioCommon/Src/AOSoundStream.h index 0b3cef9f0e..f8fe67b727 100644 --- a/Source/Core/AudioCommon/Src/AOSoundStream.h +++ b/Source/Core/AudioCommon/Src/AOSoundStream.h @@ -6,13 +6,12 @@ #define _AOSOUNDSTREAM_H_ #include "SoundStream.h" +#include "Thread.h" #if defined(HAVE_AO) && HAVE_AO #include #endif -#include "Thread.h" - class AOSound : public SoundStream { #if defined(HAVE_AO) && HAVE_AO diff --git a/Source/Core/AudioCommon/Src/NullSoundStream.cpp b/Source/Core/AudioCommon/Src/NullSoundStream.cpp index fd8be94511..fa69012b32 100644 --- a/Source/Core/AudioCommon/Src/NullSoundStream.cpp +++ b/Source/Core/AudioCommon/Src/NullSoundStream.cpp @@ -2,7 +2,6 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include "CommonTypes.h" #include "NullSoundStream.h" #include "../../Core/Src/HW/SystemTimers.h" #include "../../Core/Src/HW/AudioInterface.h" diff --git a/Source/Core/AudioCommon/Src/OpenALStream.h b/Source/Core/AudioCommon/Src/OpenALStream.h index 0fd8f933a7..488f0d0df4 100644 --- a/Source/Core/AudioCommon/Src/OpenALStream.h +++ b/Source/Core/AudioCommon/Src/OpenALStream.h @@ -5,7 +5,6 @@ #ifndef _OPENALSTREAM_H_ #define _OPENALSTREAM_H_ -#include "CommonTypes.h" #include "SoundStream.h" #include "Thread.h" diff --git a/Source/Core/Common/Src/FileSearch.cpp b/Source/Core/Common/Src/FileSearch.cpp index f790b68c4d..3a6b6c1dc9 100644 --- a/Source/Core/Common/Src/FileSearch.cpp +++ b/Source/Core/Common/Src/FileSearch.cpp @@ -12,11 +12,9 @@ #include #endif -#include #include #include "FileSearch.h" - #include "StringUtil.h" @@ -46,7 +44,7 @@ void CFileSearch::FindFiles(const std::string& _searchString, const std::string& bool bkeepLooping = true; while (bkeepLooping) - { + { if (findData.cFileName[0] != '.') { std::string strFilename; diff --git a/Source/Core/Common/Src/FileUtil.cpp b/Source/Core/Common/Src/FileUtil.cpp index 2d143787d7..84a48599da 100644 --- a/Source/Core/Common/Src/FileUtil.cpp +++ b/Source/Core/Common/Src/FileUtil.cpp @@ -3,18 +3,16 @@ // Refer to the license.txt file included. -#include "Common.h" #include "CommonPaths.h" #include "FileUtil.h" -#include "StringUtil.h" #ifdef _WIN32 #include -#include // for SHGetFolderPath +#include // for SHGetFolderPath #include -#include // for GetSaveFileName +#include // for GetSaveFileName #include -#include // getcwd +#include // getcwd #else #include #include @@ -34,8 +32,6 @@ #include #include -#include "StringUtil.h" - #ifndef S_ISDIR #define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR) #endif diff --git a/Source/Core/Common/Src/Hash.h b/Source/Core/Common/Src/Hash.h index 8bf76cbe88..e79af99296 100644 --- a/Source/Core/Common/Src/Hash.h +++ b/Source/Core/Common/Src/Hash.h @@ -6,13 +6,13 @@ #ifndef _HASH_H_ #define _HASH_H_ -#include "Common.h" +#include "CommonTypes.h" u32 HashFletcher(const u8* data_u8, size_t length); // FAST. Length & 1 == 0. u32 HashAdler32(const u8* data, size_t len); // Fairly accurate, slightly slower u32 HashFNV(const u8* ptr, int length); // Another fast and decent hash u32 HashEctor(const u8* ptr, int length); // JUNK. DO NOT USE FOR NEW THINGS -u64 GetCRC32(const u8 *src, int len, u32 samples); // SSE4.2 version of CRC32 +u64 GetCRC32(const u8 *src, int len, u32 samples); // SSE4.2 version of CRC32 u64 GetHashHiresTexture(const u8 *src, int len, u32 samples); u64 GetMurmurHash3(const u8 *src, int len, u32 samples); u64 GetHash64(const u8 *src, int len, u32 samples); diff --git a/Source/Core/Common/Src/Log.h b/Source/Core/Common/Src/Log.h index 8691a825f8..7ad70b779a 100644 --- a/Source/Core/Common/Src/Log.h +++ b/Source/Core/Common/Src/Log.h @@ -5,16 +5,17 @@ #ifndef _LOG_H_ #define _LOG_H_ -#define NOTICE_LEVEL 1 // VERY important information that is NOT errors. Like startup and OSReports. -#define ERROR_LEVEL 2 // Critical errors -#define WARNING_LEVEL 3 // Something is suspicious. -#define INFO_LEVEL 4 // General information. -#define DEBUG_LEVEL 5 // Detailed debugging - might make things slow. +#define NOTICE_LEVEL 1 // VERY important information that is NOT errors. Like startup and OSReports. +#define ERROR_LEVEL 2 // Critical errors +#define WARNING_LEVEL 3 // Something is suspicious. +#define INFO_LEVEL 4 // General information. +#define DEBUG_LEVEL 5 // Detailed debugging - might make things slow. namespace LogTypes { -enum LOG_TYPE { +enum LOG_TYPE +{ ACTIONREPLAY, AUDIO, AUDIO_INTERFACE, @@ -67,12 +68,13 @@ enum LOG_TYPE { }; // FIXME: should this be removed? -enum LOG_LEVELS { - LNOTICE = NOTICE_LEVEL, - LERROR = ERROR_LEVEL, +enum LOG_LEVELS +{ + LNOTICE = NOTICE_LEVEL, + LERROR = ERROR_LEVEL, LWARNING = WARNING_LEVEL, - LINFO = INFO_LEVEL, - LDEBUG = DEBUG_LEVEL, + LINFO = INFO_LEVEL, + LDEBUG = DEBUG_LEVEL, }; #define LOGTYPES_LEVELS LogTypes::LOG_LEVELS diff --git a/Source/Core/Common/Src/MathUtil.cpp b/Source/Core/Common/Src/MathUtil.cpp index 0e90328ee0..435f18ab09 100644 --- a/Source/Core/Common/Src/MathUtil.cpp +++ b/Source/Core/Common/Src/MathUtil.cpp @@ -2,8 +2,6 @@ // Licensed under GPLv2 // Refer to the license.txt file included. - -#include "Common.h" #include "MathUtil.h" #include @@ -144,7 +142,7 @@ void Matrix33::RotateY(Matrix33 &mtx, float rad) mtx.data[0] = c; mtx.data[2] = s; mtx.data[4] = 1; - mtx.data[6] = -s; + mtx.data[6] = -s; mtx.data[8] = c; } @@ -155,9 +153,12 @@ void Matrix33::Multiply(const Matrix33 &a, const Matrix33 &b, Matrix33 &result) void Matrix33::Multiply(const Matrix33 &a, const float vec[3], float result[3]) { - for (int i = 0; i < 3; ++i) { + for (int i = 0; i < 3; ++i) + { result[i] = 0; - for (int k = 0; k < 3; ++k) { + + for (int k = 0; k < 3; ++k) + { result[i] += a.data[i * 3 + k] * vec[k]; } } @@ -192,7 +193,8 @@ void Matrix44::LoadMatrix33(Matrix44 &mtx, const Matrix33 &m33) void Matrix44::Set(Matrix44 &mtx, const float mtxArray[16]) { - for(int i = 0; i < 16; ++i) { + for(int i = 0; i < 16; ++i) + { mtx.data[i] = mtxArray[i]; } } diff --git a/Source/Core/Common/Src/MemArena.cpp b/Source/Core/Common/Src/MemArena.cpp index 13c9be33bb..49c51fd2ee 100644 --- a/Source/Core/Common/Src/MemArena.cpp +++ b/Source/Core/Common/Src/MemArena.cpp @@ -2,8 +2,8 @@ // Licensed under GPLv2 // Refer to the license.txt file included. +#include -#include "Common.h" #include "MemoryUtil.h" #include "MemArena.h" @@ -20,7 +20,6 @@ #include #endif #endif -#include #if defined(__APPLE__) static const char* ram_temp_file = "/tmp/gc_mem.tmp"; diff --git a/Source/Core/Common/Src/MemoryUtil.h b/Source/Core/Common/Src/MemoryUtil.h index 49b2589da3..79b35e41c4 100644 --- a/Source/Core/Common/Src/MemoryUtil.h +++ b/Source/Core/Common/Src/MemoryUtil.h @@ -6,10 +6,11 @@ #ifndef _MEMORYUTIL_H #define _MEMORYUTIL_H +#include + #ifndef _WIN32 #include #endif -#include void* AllocateExecutableMemory(size_t size, bool low = true); void* AllocateMemoryPages(size_t size); diff --git a/Source/Core/Common/Src/Misc.cpp b/Source/Core/Common/Src/Misc.cpp index ce42deb4d2..3ef0adb563 100644 --- a/Source/Core/Common/Src/Misc.cpp +++ b/Source/Core/Common/Src/Misc.cpp @@ -2,7 +2,7 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include "Common.h" +#include "CommonTypes.h" // Neither Android nor OS X support TLS #if defined(__APPLE__) || (ANDROID && __clang__) diff --git a/Source/Core/Common/Src/SettingsHandler.cpp b/Source/Core/Common/Src/SettingsHandler.cpp index 3bd9b27c2f..555cf0eae9 100644 --- a/Source/Core/Common/Src/SettingsHandler.cpp +++ b/Source/Core/Common/Src/SettingsHandler.cpp @@ -4,7 +4,6 @@ // Thanks to Treeki for writing the original class - 29/01/2012 -#include "Common.h" #include "CommonPaths.h" #include "Timer.h" #include "SettingsHandler.h" diff --git a/Source/Core/Common/Src/SettingsHandler.h b/Source/Core/Common/Src/SettingsHandler.h index 9557dc5792..232555dea2 100644 --- a/Source/Core/Common/Src/SettingsHandler.h +++ b/Source/Core/Common/Src/SettingsHandler.h @@ -8,7 +8,7 @@ #include -#include "Common.h" +#include "CommonTypes.h" class SettingsHandler { diff --git a/Source/Core/Common/Src/StringUtil.cpp b/Source/Core/Common/Src/StringUtil.cpp index 189dfe98bc..16cf890ad6 100644 --- a/Source/Core/Common/Src/StringUtil.cpp +++ b/Source/Core/Common/Src/StringUtil.cpp @@ -6,7 +6,6 @@ #include #include -#include "Common.h" #include "CommonPaths.h" #include "StringUtil.h" diff --git a/Source/Core/Common/Src/Thread.cpp b/Source/Core/Common/Src/Thread.cpp index 4040d04e42..a022b326a5 100644 --- a/Source/Core/Common/Src/Thread.cpp +++ b/Source/Core/Common/Src/Thread.cpp @@ -3,7 +3,6 @@ // Refer to the license.txt file included. #include "Thread.h" -#include "Common.h" #ifdef __APPLE__ #include diff --git a/Source/Core/Common/Src/Timer.cpp b/Source/Core/Common/Src/Timer.cpp index 945d2fac76..b7ae848970 100644 --- a/Source/Core/Common/Src/Timer.cpp +++ b/Source/Core/Common/Src/Timer.cpp @@ -12,7 +12,6 @@ #include #endif -#include "Common.h" #include "Timer.h" #include "StringUtil.h" diff --git a/Source/Core/Common/Src/x64ABI.cpp b/Source/Core/Common/Src/x64ABI.cpp index 3750636c3e..b590282a0b 100644 --- a/Source/Core/Common/Src/x64ABI.cpp +++ b/Source/Core/Common/Src/x64ABI.cpp @@ -2,9 +2,8 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include "Common.h" -#include "x64Emitter.h" #include "x64ABI.h" +#include "x64Emitter.h" using namespace Gen; diff --git a/Source/Core/Common/Src/x64Analyzer.h b/Source/Core/Common/Src/x64Analyzer.h index 028d291079..778c34738c 100644 --- a/Source/Core/Common/Src/x64Analyzer.h +++ b/Source/Core/Common/Src/x64Analyzer.h @@ -5,7 +5,7 @@ #ifndef _X64ANALYZER_H_ #define _X64ANALYZER_H_ -#include "Common.h" +#include "CommonTypes.h" struct InstructionInfo { diff --git a/Source/Core/Core/Src/BootManager.cpp b/Source/Core/Core/Src/BootManager.cpp index a2e7688ca9..86faed9097 100644 --- a/Source/Core/Core/Src/BootManager.cpp +++ b/Source/Core/Core/Src/BootManager.cpp @@ -23,7 +23,7 @@ #include #include -#include "Common.h" +#include "CommonTypes.h" #include "CommonPaths.h" #include "IniFile.h" #include "BootManager.h" diff --git a/Source/Core/Core/Src/ConfigManager.cpp b/Source/Core/Core/Src/ConfigManager.cpp index fd328e12e2..d87fdcc0b5 100644 --- a/Source/Core/Core/Src/ConfigManager.cpp +++ b/Source/Core/Core/Src/ConfigManager.cpp @@ -2,21 +2,20 @@ // Licensed under GPLv2 // Refer to the license.txt file included. -#include - #include "Common.h" #include "CommonPaths.h" -#include "IniFile.h" #include "ConfigManager.h" +#include "IniFile.h" #include "FileUtil.h" #include "NANDContentLoader.h" SConfig* SConfig::m_Instance; -static const struct { - const char* IniText; - const int DefaultKey; - const int DefaultModifier; +static const struct +{ + const char* IniText; + const int DefaultKey; + const int DefaultModifier; } g_HKData[] = { #ifdef __APPLE__ { "Open", 79 /* 'O' */, 2 /* wxMOD_CMD */ },