Skip to content

Commit

Permalink
Remove some more includes.
Browse files Browse the repository at this point in the history
  • Loading branch information
lioncash committed Oct 19, 2013
1 parent 207547b commit 1f0710c
Show file tree
Hide file tree
Showing 20 changed files with 42 additions and 53 deletions.
3 changes: 1 addition & 2 deletions Source/Core/AudioCommon/Src/AOSoundStream.h
Expand Up @@ -6,13 +6,12 @@
#define _AOSOUNDSTREAM_H_

#include "SoundStream.h"
#include "Thread.h"

#if defined(HAVE_AO) && HAVE_AO
#include <ao/ao.h>
#endif

#include "Thread.h"

class AOSound : public SoundStream
{
#if defined(HAVE_AO) && HAVE_AO
Expand Down
1 change: 0 additions & 1 deletion Source/Core/AudioCommon/Src/NullSoundStream.cpp
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion Source/Core/AudioCommon/Src/OpenALStream.h
Expand Up @@ -5,7 +5,6 @@
#ifndef _OPENALSTREAM_H_
#define _OPENALSTREAM_H_

#include "CommonTypes.h"
#include "SoundStream.h"
#include "Thread.h"

Expand Down
4 changes: 1 addition & 3 deletions Source/Core/Common/Src/FileSearch.cpp
Expand Up @@ -12,11 +12,9 @@
#include <windows.h>
#endif

#include <string>
#include <algorithm>

#include "FileSearch.h"

#include "StringUtil.h"


Expand Down Expand Up @@ -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;
Expand Down
10 changes: 3 additions & 7 deletions Source/Core/Common/Src/FileUtil.cpp
Expand Up @@ -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 <windows.h>
#include <shlobj.h> // for SHGetFolderPath
#include <shlobj.h> // for SHGetFolderPath
#include <shellapi.h>
#include <commdlg.h> // for GetSaveFileName
#include <commdlg.h> // for GetSaveFileName
#include <io.h>
#include <direct.h> // getcwd
#include <direct.h> // getcwd
#else
#include <sys/param.h>
#include <sys/types.h>
Expand All @@ -34,8 +32,6 @@
#include <algorithm>
#include <sys/stat.h>

#include "StringUtil.h"

#ifndef S_ISDIR
#define S_ISDIR(m) (((m)&S_IFMT) == S_IFDIR)
#endif
Expand Down
4 changes: 2 additions & 2 deletions Source/Core/Common/Src/Hash.h
Expand Up @@ -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);
Expand Down
24 changes: 13 additions & 11 deletions Source/Core/Common/Src/Log.h
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
14 changes: 8 additions & 6 deletions Source/Core/Common/Src/MathUtil.cpp
Expand Up @@ -2,8 +2,6 @@
// Licensed under GPLv2
// Refer to the license.txt file included.


#include "Common.h"
#include "MathUtil.h"

#include <cmath>
Expand Down Expand Up @@ -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;
}

Expand All @@ -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];
}
}
Expand Down Expand Up @@ -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];
}
}
Expand Down
3 changes: 1 addition & 2 deletions Source/Core/Common/Src/MemArena.cpp
Expand Up @@ -2,8 +2,8 @@
// Licensed under GPLv2
// Refer to the license.txt file included.

#include <set>

#include "Common.h"
#include "MemoryUtil.h"
#include "MemArena.h"

Expand All @@ -20,7 +20,6 @@
#include <linux/ashmem.h>
#endif
#endif
#include <set>

#if defined(__APPLE__)
static const char* ram_temp_file = "/tmp/gc_mem.tmp";
Expand Down
3 changes: 2 additions & 1 deletion Source/Core/Common/Src/MemoryUtil.h
Expand Up @@ -6,10 +6,11 @@
#ifndef _MEMORYUTIL_H
#define _MEMORYUTIL_H

#include <string>

#ifndef _WIN32
#include <sys/mman.h>
#endif
#include <string>

void* AllocateExecutableMemory(size_t size, bool low = true);
void* AllocateMemoryPages(size_t size);
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/Misc.cpp
Expand Up @@ -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__)
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Common/Src/SettingsHandler.cpp
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/SettingsHandler.h
Expand Up @@ -8,7 +8,7 @@

#include <string>

#include "Common.h"
#include "CommonTypes.h"

class SettingsHandler
{
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Common/Src/StringUtil.cpp
Expand Up @@ -6,7 +6,6 @@
#include <stdio.h>
#include <algorithm>

#include "Common.h"
#include "CommonPaths.h"
#include "StringUtil.h"

Expand Down
1 change: 0 additions & 1 deletion Source/Core/Common/Src/Thread.cpp
Expand Up @@ -3,7 +3,6 @@
// Refer to the license.txt file included.

#include "Thread.h"
#include "Common.h"

#ifdef __APPLE__
#include <mach/mach.h>
Expand Down
1 change: 0 additions & 1 deletion Source/Core/Common/Src/Timer.cpp
Expand Up @@ -12,7 +12,6 @@
#include <sys/time.h>
#endif

#include "Common.h"
#include "Timer.h"
#include "StringUtil.h"

Expand Down
3 changes: 1 addition & 2 deletions Source/Core/Common/Src/x64ABI.cpp
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Common/Src/x64Analyzer.h
Expand Up @@ -5,7 +5,7 @@
#ifndef _X64ANALYZER_H_
#define _X64ANALYZER_H_

#include "Common.h"
#include "CommonTypes.h"

struct InstructionInfo
{
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/BootManager.cpp
Expand Up @@ -23,7 +23,7 @@
#include <string>
#include <vector>

#include "Common.h"
#include "CommonTypes.h"
#include "CommonPaths.h"
#include "IniFile.h"
#include "BootManager.h"
Expand Down
13 changes: 6 additions & 7 deletions Source/Core/Core/Src/ConfigManager.cpp
Expand Up @@ -2,21 +2,20 @@
// Licensed under GPLv2
// Refer to the license.txt file included.

#include <string>

#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 */ },
Expand Down

0 comments on commit 1f0710c

Please sign in to comment.