Skip to content

Commit

Permalink
Core: include what you use
Browse files Browse the repository at this point in the history
Eliminates a swath of indirectly included standard headers
  • Loading branch information
lioncash committed Jun 7, 2017
1 parent 62041bd commit 63ea3e6
Show file tree
Hide file tree
Showing 64 changed files with 124 additions and 5 deletions.
2 changes: 2 additions & 0 deletions Source/Core/Core/ARDecrypt.cpp
Expand Up @@ -10,6 +10,8 @@

#include <algorithm>
#include <cstring>
#include <string>
#include <vector>

#ifdef _WIN32
#include <windows.h>
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/ActionReplay.cpp
Expand Up @@ -21,6 +21,7 @@

#include <algorithm>
#include <atomic>
#include <cstdarg>
#include <iterator>
#include <mutex>
#include <string>
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Boot/Boot.cpp
Expand Up @@ -5,6 +5,7 @@
#include "Core/Boot/Boot.h"

#include <algorithm>
#include <memory>
#include <optional>
#include <string>
#include <unordered_set>
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/ConfigLoaders/BaseConfigLoader.cpp
Expand Up @@ -5,6 +5,7 @@
#include <cstring>
#include <list>
#include <map>
#include <memory>
#include <string>

#include "Common/CommonPaths.h"
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/ConfigLoaders/GameConfigLoader.cpp
Expand Up @@ -4,8 +4,10 @@

#include <algorithm>
#include <array>
#include <list>
#include <map>
#include <string>
#include <sstream>
#include <tuple>
#include <utility>
#include <vector>
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/ConfigLoaders/MovieConfigLoader.cpp
Expand Up @@ -3,6 +3,7 @@
// Refer to the license.txt file included.

#include <cstring>
#include <memory>
#include <string>

#include "Common/CommonFuncs.h"
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/ConfigLoaders/NetPlayConfigLoader.cpp
Expand Up @@ -2,6 +2,8 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include <memory>

#include "Common/CommonPaths.h"
#include "Common/Config/Config.h"
#include "Common/FileUtil.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/ConfigManager.cpp
Expand Up @@ -6,6 +6,7 @@
#include <climits>
#include <memory>
#include <optional>
#include <sstream>
#include <variant>

#include "AudioCommon/AudioCommon.h"
Expand Down
4 changes: 3 additions & 1 deletion Source/Core/Core/DSP/DSPAssembler.cpp
Expand Up @@ -5,15 +5,17 @@

#include "Core/DSP/DSPAssembler.h"

#include <algorithm>
#include <cstddef>
#include <cstdio>
#include <cstdlib>
#include <cstring>
#include <fstream>
#include <iostream>
#include <map>
#include <sstream>
#include <string>
#include <utility>
#include <vector>

#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/DSP/DSPCaptureLogger.cpp
Expand Up @@ -4,6 +4,7 @@

#include <cstring>
#include <memory>
#include <string>

#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/DSP/DSPDisassembler.cpp
Expand Up @@ -9,6 +9,7 @@
#include <cstdlib>
#include <fstream>
#include <string>
#include <vector>

#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/DSP/DSPHWInterface.cpp
Expand Up @@ -5,6 +5,7 @@

#include "Core/DSP/DSPHWInterface.h"

#include <atomic>
#include <cstddef>
#include <cstring>

Expand Down
3 changes: 3 additions & 0 deletions Source/Core/Core/DSP/LabelMap.cpp
Expand Up @@ -2,6 +2,9 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include <string>
#include <vector>

#include "Core/DSP/LabelMap.h"
#include "Core/DSP/DSPTables.h"

Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/Debugger/Debugger_SymbolMap.cpp
Expand Up @@ -2,6 +2,7 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include <cstdio>
#include <functional>
#include <string>

Expand Down
4 changes: 4 additions & 0 deletions Source/Core/Core/Debugger/RSO.cpp
Expand Up @@ -4,7 +4,11 @@

#include "Core/Debugger/RSO.h"

#include <cstddef>
#include <list>
#include <string>
#include <utility>
#include <vector>

#include "Common/CommonFuncs.h"
#include "Common/Logging/Log.h"
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/FifoPlayer/FifoDataFile.cpp
Expand Up @@ -4,7 +4,9 @@

#include <algorithm>
#include <cstring>
#include <memory>
#include <string>
#include <vector>

#include "Common/FileUtil.h"

Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/FifoPlayer/FifoPlaybackAnalyzer.cpp
Expand Up @@ -4,6 +4,8 @@

#include "Core/FifoPlayer/FifoPlaybackAnalyzer.h"

#include <vector>

#include "Common/CommonTypes.h"
#include "Core/FifoPlayer/FifoAnalyzer.h"
#include "Core/FifoPlayer/FifoDataFile.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/FifoPlayer/FifoRecorder.cpp
Expand Up @@ -3,6 +3,7 @@
// Refer to the license.txt file included.

#include <algorithm>
#include <cstring>
#include <mutex>

#include "Core/FifoPlayer/FifoRecorder.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/GeckoCodeConfig.cpp
Expand Up @@ -5,6 +5,7 @@
#include "Core/GeckoCodeConfig.h"

#include <algorithm>
#include <memory>
#include <sstream>
#include <string>
#include <vector>
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/Core/HW/DSPHLE/MailHandler.cpp
Expand Up @@ -3,6 +3,9 @@
// Refer to the license.txt file included.

#include "Core/HW/DSPHLE/MailHandler.h"

#include <queue>

#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
#include "Common/Logging/Log.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/DSPHLE/UCodes/UCodes.cpp
Expand Up @@ -5,6 +5,7 @@
#include "Core/HW/DSPHLE/UCodes/UCodes.h"

#include <cstring>
#include <memory>
#include <string>

#ifdef _WIN32
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/DSPHLE/UCodes/Zelda.cpp
Expand Up @@ -5,6 +5,7 @@
#include "Core/HW/DSPHLE/UCodes/Zelda.h"

#include <array>
#include <map>

#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/Core/HW/DSPLLE/DSPHost.cpp
Expand Up @@ -3,6 +3,9 @@
// Refer to the license.txt file included.

#include "Core/DSP/DSPHost.h"

#include <string>

#include "Common/CommonTypes.h"
#include "Common/Hash.h"
#include "Common/Logging/Log.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/DVD/DVDInterface.cpp
Expand Up @@ -7,6 +7,7 @@
#include <memory>
#include <optional>
#include <string>
#include <vector>

#include "AudioCommon/AudioCommon.h"

Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/HW/EXI/EXI_DeviceAGP.cpp
Expand Up @@ -4,8 +4,10 @@

#include "Core/HW/EXI/EXI_DeviceAGP.h"

#include <algorithm>
#include <memory>
#include <string>
#include <vector>

#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/HW/EXI/EXI_DeviceDummy.cpp
Expand Up @@ -4,6 +4,8 @@

#include "Core/HW/EXI/EXI_DeviceDummy.h"

#include <string>

#include "Common/CommonTypes.h"
#include "Common/Logging/Log.h"

Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/EXI/EXI_DeviceEthernet.cpp
Expand Up @@ -4,6 +4,7 @@

#include "Core/HW/EXI/EXI_DeviceEthernet.h"

#include <memory>
#include <string>

#include "Common/ChunkFile.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/EXI/EXI_DeviceIPL.cpp
Expand Up @@ -5,6 +5,7 @@
#include "Core/HW/EXI/EXI_DeviceIPL.h"

#include <cstring>
#include <string>

#include "Common/Assert.h"
#include "Common/ChunkFile.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/EXI/EXI_DeviceMemoryCard.cpp
Expand Up @@ -6,6 +6,7 @@

#include <array>
#include <cstring>
#include <functional>
#include <memory>
#include <string>

Expand Down
5 changes: 3 additions & 2 deletions Source/Core/Core/HW/EXI/EXI_DeviceMic.cpp
Expand Up @@ -2,9 +2,12 @@
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include <algorithm>
#include <cstring>
#include <mutex>

#include <cubeb/cubeb.h>

#include "AudioCommon/CubebUtils.h"
#include "Common/Common.h"
#include "Common/CommonTypes.h"
Expand All @@ -17,8 +20,6 @@
#include "Core/HW/GCPad.h"
#include "Core/HW/SystemTimers.h"

#include <cubeb/cubeb.h>

namespace ExpansionInterface
{
void CEXIMic::StreamInit()
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/HW/GCMemcard/GCMemcardDirectory.cpp
Expand Up @@ -4,12 +4,14 @@

#include "Core/HW/GCMemcard/GCMemcardDirectory.h"

#include <algorithm>
#include <chrono>
#include <cinttypes>
#include <cstring>
#include <memory>
#include <mutex>
#include <string>
#include <vector>

#include "Common/Assert.h"
#include "Common/ChunkFile.h"
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/HW/GCMemcard/GCMemcardRaw.cpp
Expand Up @@ -7,7 +7,9 @@
#include <chrono>
#include <cstring>
#include <memory>
#include <mutex>
#include <string>
#include <thread>

#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/GPFifo.cpp
Expand Up @@ -4,6 +4,7 @@

#include "Core/HW/GPFifo.h"

#include <cstddef>
#include <cstring>

#include "Common/ChunkFile.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/Memmap.cpp
Expand Up @@ -7,6 +7,7 @@
// However, if a JITed instruction (for example lwz) wants to access a bad memory area that call
// may be redirected here (for example to Read_U32()).

#include <algorithm>
#include <cstring>
#include <memory>

Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/ProcessorInterface.cpp
Expand Up @@ -3,6 +3,7 @@
// Refer to the license.txt file included.

#include <cstdio>
#include <memory>

#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/WiimoteEmu/EmuSubroutines.cpp
Expand Up @@ -16,6 +16,7 @@
0x30 - 0x3f Input This file: Update() */

#include <fstream>
#include <mutex>
#include <queue>
#include <string>
#include <vector>
Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/HW/WiimoteEmu/WiimoteEmu.cpp
Expand Up @@ -4,9 +4,11 @@

#include "Core/HW/WiimoteEmu/WiimoteEmu.h"

#include <algorithm>
#include <cassert>
#include <cmath>
#include <cstring>
#include <mutex>

#include "Common/ChunkFile.h"
#include "Common/CommonTypes.h"
Expand Down
1 change: 1 addition & 0 deletions Source/Core/Core/HW/WiimoteReal/WiimoteReal.cpp
Expand Up @@ -6,6 +6,7 @@

#include <algorithm>
#include <cstdlib>
#include <mutex>
#include <queue>
#include <unordered_set>

Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/HotkeyManager.cpp
Expand Up @@ -4,6 +4,8 @@

#include "Core/HotkeyManager.h"

#include <algorithm>
#include <array>
#include <string>
#include <vector>

Expand Down
2 changes: 2 additions & 0 deletions Source/Core/Core/IOS/ES/Formats.cpp
Expand Up @@ -5,10 +5,12 @@
#include "Core/IOS/ES/Formats.h"

#include <algorithm>
#include <array>
#include <cinttypes>
#include <cstddef>
#include <cstring>
#include <locale>
#include <optional>
#include <string>
#include <utility>
#include <vector>
Expand Down
3 changes: 3 additions & 0 deletions Source/Core/Core/IOS/IOSC.cpp
Expand Up @@ -3,7 +3,10 @@
// Refer to the license.txt file included.

#include <algorithm>
#include <array>
#include <cstddef>
#include <cstring>
#include <vector>

#include <mbedtls/sha1.h>

Expand Down

0 comments on commit 63ea3e6

Please sign in to comment.