Skip to content

Commit

Permalink
Remove unnecessary header includes
Browse files Browse the repository at this point in the history
- Manually removed lot of unneeded #includes to clean code and reduce
  compilation time
- Reordered some of the #includes to be in more logical order
  • Loading branch information
kukkamario committed Oct 4, 2018
1 parent 0b32117 commit 6a90908
Show file tree
Hide file tree
Showing 77 changed files with 131 additions and 150 deletions.
2 changes: 0 additions & 2 deletions rpcs3/Crypto/unedat.h
@@ -1,7 +1,5 @@
#pragma once

#include <stdio.h>
#include <string.h>
#include <array>

#include "utils.h"
Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Audio/AL/OpenALThread.cpp
@@ -1,7 +1,8 @@
#include "stdafx.h"
#include "OpenALThread.h"

#include "Emu/System.h"

#include "OpenALThread.h"

#ifdef _MSC_VER
#pragma comment(lib, "OpenAL32.lib")
Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Audio/ALSA/ALSAThread.cpp
@@ -1,7 +1,8 @@
#include "stdafx.h"
#include "ALSAThread.h"

#include "Emu/System.h"

#include "ALSAThread.h"

#ifdef HAVE_ALSA

Expand Down
2 changes: 1 addition & 1 deletion rpcs3/Emu/Audio/Pulse/PulseThread.cpp
@@ -1,5 +1,5 @@
#include "Emu/System.h"
#include "PulseThread.h"
#include "Emu/System.h"

#ifdef HAVE_PULSE

Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/CPU/CPUThread.cpp
@@ -1,7 +1,8 @@
#include "stdafx.h"
#include "CPUThread.h"

#include "Emu/System.h"
#include "Emu/Memory/vm_locking.h"
#include "CPUThread.h"
#include "Emu/IdManager.h"
#include "Utilities/GDBDebugServer.h"
#include <typeinfo>
Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Cell/MFC.cpp
@@ -1,10 +1,11 @@
#include "stdafx.h"
#include "MFC.h"

#include "Utilities/sysinfo.h"
#include "Emu/Memory/vm.h"
#include "Emu/Cell/SPUThread.h"
#include "Emu/Cell/lv2/sys_sync.h"
#include "Emu/System.h"
#include "MFC.h"

template <>
void fmt_class_string<MFC>::format(std::string& out, u64 arg)
Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Cell/PPUAnalyser.cpp
@@ -1,7 +1,8 @@
#include "stdafx.h"
#include "PPUAnalyser.h"

#include "PPUOpcodes.h"
#include "PPUModule.h"
#include "PPUAnalyser.h"

#include <unordered_set>
#include "yaml-cpp/yaml.h"
Expand Down
2 changes: 2 additions & 0 deletions rpcs3/Emu/Cell/PPUFunction.cpp
@@ -1,4 +1,6 @@
#include "stdafx.h"
#include "PPUFunction.h"

#include "PPUModule.h"

extern std::string ppu_get_syscall_name(u64 code)
Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Cell/PPUInterpreter.cpp
@@ -1,8 +1,9 @@
#include "stdafx.h"
#include "PPUInterpreter.h"

#include "Emu/Memory/vm_reservation.h"
#include "Emu/System.h"
#include "PPUThread.h"
#include "PPUInterpreter.h"
#include "Utilities/asm.h"

#include <cmath>
Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Cell/PPUModule.cpp
@@ -1,4 +1,6 @@
#include "stdafx.h"
#include "Emu/Cell/PPUModule.h"

#include "Utilities/VirtualMemory.h"
#include "Utilities/bin_patch.h"
#include "Crypto/sha1.h"
Expand All @@ -8,7 +10,6 @@
#include "Emu/IdManager.h"

#include "Emu/Cell/PPUOpcodes.h"
#include "Emu/Cell/PPUModule.h"
#include "Emu/Cell/PPUAnalyser.h"

#include "Emu/Cell/lv2/sys_prx.h"
Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Cell/PPUThread.cpp
@@ -1,12 +1,13 @@
#include "stdafx.h"
#include "PPUThread.h"

#include "Utilities/VirtualMemory.h"
#include "Utilities/sysinfo.h"
#include "Utilities/JIT.h"
#include "Crypto/sha1.h"
#include "Emu/Memory/vm_reservation.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "PPUThread.h"
#include "PPUInterpreter.h"
#include "PPUAnalyser.h"
#include "PPUModule.h"
Expand Down
6 changes: 3 additions & 3 deletions rpcs3/Emu/Cell/PPUTranslator.h
Expand Up @@ -2,9 +2,9 @@

#ifdef LLVM_AVAILABLE

#include "../rpcs3/Emu/CPU/CPUTranslator.h"
#include "../rpcs3/Emu/Cell/PPUOpcodes.h"
#include "../rpcs3/Emu/Cell/PPUAnalyser.h"
#include "Emu/CPU/CPUTranslator.h"
#include "PPUOpcodes.h"
#include "PPUAnalyser.h"

class PPUTranslator final : public cpu_translator
{
Expand Down
5 changes: 2 additions & 3 deletions rpcs3/Emu/Cell/SPUASMJITRecompiler.cpp
@@ -1,5 +1,6 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "SPUASMJITRecompiler.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"

Expand All @@ -14,8 +15,6 @@
#include <mutex>
#include <thread>

#include "SPUASMJITRecompiler.h"

#define SPU_OFF_128(x, ...) asmjit::x86::oword_ptr(*cpu, offset32(&SPUThread::x, ##__VA_ARGS__))
#define SPU_OFF_64(x, ...) asmjit::x86::qword_ptr(*cpu, offset32(&SPUThread::x, ##__VA_ARGS__))
#define SPU_OFF_32(x, ...) asmjit::x86::dword_ptr(*cpu, offset32(&SPUThread::x, ##__VA_ARGS__))
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/SPUInterpreter.cpp
@@ -1,11 +1,11 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "SPUInterpreter.h"

#include "Emu/System.h"
#include "Utilities/JIT.h"
#include "Utilities/sysinfo.h"
#include "Utilities/asm.h"
#include "SPUThread.h"
#include "SPUInterpreter.h"

#include <cmath>
#include <cfenv>
Expand Down
6 changes: 3 additions & 3 deletions rpcs3/Emu/Cell/SPURecompiler.cpp
@@ -1,15 +1,15 @@
#include "stdafx.h"
#include "stdafx.h"
#include "SPURecompiler.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Memory/vm.h"
#include "Crypto/sha1.h"
#include "Utilities/StrUtil.h"

#include "SPUThread.h"
#include "SPUAnalyser.h"
#include "SPUInterpreter.h"
#include "SPUDisAsm.h"
#include "SPURecompiler.h"
#include "PPUAnalyser.h"
#include <algorithm>
#include <mutex>
Expand Down
5 changes: 2 additions & 3 deletions rpcs3/Emu/Cell/lv2/sys_cond.cpp
@@ -1,13 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_cond.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"

#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_mutex.h"
#include "sys_cond.h"



Expand Down
3 changes: 1 addition & 2 deletions rpcs3/Emu/Cell/lv2/sys_dbg.cpp
@@ -1,8 +1,7 @@
#include "stdafx.h"
#include "sys_dbg.h"

#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Memory/vm.h"
#include "sys_dbg.h"
#include "Emu/Cell/Modules/sys_lv2dbg.h"

LOG_CHANNEL(sys_dbg);
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_event.cpp
@@ -1,5 +1,6 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_event.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"
Expand All @@ -8,7 +9,6 @@
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/SPUThread.h"
#include "sys_process.h"
#include "sys_event.h"



Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_event_flag.cpp
@@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_event_flag.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"

#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_event_flag.h"

#include <algorithm>

Expand Down
8 changes: 2 additions & 6 deletions rpcs3/Emu/Cell/lv2/sys_gamepad.cpp
@@ -1,12 +1,8 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "Emu/System.h"
#include "Emu/IdManager.h"

#include "Emu/Cell/ErrorCodes.h"

#include "sys_gamepad.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"


LOG_CHANNEL(sys_gamepad);
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_gpio.cpp
@@ -1,11 +1,11 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_gpio.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"

#include "Emu/Cell/ErrorCodes.h"

#include "sys_gpio.h"

error_code sys_gpio_get(u64 device_id, vm::ptr<u64> value)
{
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_interrupt.cpp
@@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_interrupt.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"

#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "Emu/Cell/PPUOpcodes.h"
#include "sys_interrupt.h"



Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_lwcond.cpp
@@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_lwcond.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"

#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_lwmutex.h"
#include "sys_lwcond.h"



Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_lwmutex.cpp
@@ -1,11 +1,11 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_lwmutex.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"

#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_lwmutex.h"



Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Cell/lv2/sys_memory.cpp
@@ -1,7 +1,8 @@
#include "stdafx.h"
#include "sys_memory.h"

#include "Utilities/VirtualMemory.h"
#include "Emu/IdManager.h"
#include "sys_memory.h"

LOG_CHANNEL(sys_memory);

Expand Down
3 changes: 2 additions & 1 deletion rpcs3/Emu/Cell/lv2/sys_mmapper.cpp
@@ -1,11 +1,12 @@
#include "stdafx.h"
#include "sys_mmapper.h"

#include "Emu/Cell/PPUThread.h"
#include "sys_ppu_thread.h"
#include "Emu/Cell/lv2/sys_event.h"
#include "Emu/Memory/vm_var.h"
#include "Utilities/VirtualMemory.h"
#include "sys_memory.h"
#include "sys_mmapper.h"

LOG_CHANNEL(sys_mmapper);

Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_mutex.cpp
@@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_mutex.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/IPC.h"

#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_mutex.h"



Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_net.cpp
@@ -1,12 +1,12 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_net.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"
#include "Emu/Cell/PPUThread.h"
#include "Utilities/Thread.h"

#include "sys_sync.h"
#include "sys_net.h"

#ifdef _WIN32
#include <winsock2.h>
Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_ppu_thread.cpp
@@ -1,11 +1,11 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_ppu_thread.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"

#include "Emu/Cell/ErrorCodes.h"
#include "Emu/Cell/PPUThread.h"
#include "sys_ppu_thread.h"
#include "sys_event.h"
#include "sys_mmapper.h"

Expand Down
4 changes: 2 additions & 2 deletions rpcs3/Emu/Cell/lv2/sys_process.cpp
@@ -1,5 +1,6 @@
#include "stdafx.h"
#include "Emu/Memory/vm.h"
#include "sys_process.h"

#include "Emu/System.h"
#include "Emu/IdManager.h"

Expand All @@ -21,7 +22,6 @@
#include "sys_timer.h"
#include "sys_trace.h"
#include "sys_fs.h"
#include "sys_process.h"



Expand Down

0 comments on commit 6a90908

Please sign in to comment.