From ade596121bc834502c63cdedcd8f68a1f490599d Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Fri, 18 Mar 2022 23:44:24 -0400 Subject: [PATCH] core: Reduce unused includes --- src/core/arm/dynarmic/arm_exclusive_monitor.h | 2 -- src/core/core.cpp | 1 - src/core/crypto/key_manager.h | 5 ++++- src/core/file_sys/directory.h | 1 - src/core/file_sys/patch_manager.cpp | 1 - src/core/frontend/applets/mii.h | 1 - src/core/hle/kernel/hle_ipc.cpp | 1 - src/core/hle/kernel/k_class_token.h | 2 -- src/core/hle/kernel/k_code_memory.cpp | 1 - src/core/hle/kernel/k_condition_variable.cpp | 1 - src/core/hle/kernel/k_memory_manager.cpp | 1 - src/core/hle/kernel/k_page_buffer.h | 1 - src/core/hle/kernel/k_process.cpp | 2 -- src/core/hle/kernel/k_process.h | 1 - src/core/hle/kernel/k_scheduler.cpp | 1 - src/core/hle/kernel/k_thread.cpp | 3 --- src/core/hle/kernel/k_thread_local_page.cpp | 2 ++ src/core/hle/kernel/k_thread_local_page.h | 1 - src/core/hle/kernel/kernel.cpp | 3 --- src/core/hle/kernel/kernel.h | 1 - src/core/hle/service/acc/acc.cpp | 1 - src/core/hle/service/am/applets/applet_mii.cpp | 1 - src/core/hle/service/hid/controllers/console_sixaxis.cpp | 1 - src/core/hle/service/hid/controllers/console_sixaxis.h | 1 - src/core/hle/service/hid/controllers/controller_base.h | 1 - src/core/hle/service/hid/controllers/debug_pad.h | 3 --- src/core/hle/service/hid/controllers/keyboard.h | 4 ---- src/core/hle/service/hid/controllers/mouse.h | 3 --- src/core/hle/service/hid/controllers/npad.h | 3 ++- src/core/hle/service/hid/controllers/touchscreen.cpp | 1 - src/core/hle/service/hid/controllers/touchscreen.h | 3 --- src/core/hle/service/hid/controllers/xpad.h | 2 -- src/core/hle/service/ldr/ldr.cpp | 1 - src/core/hle/service/nifm/nifm.cpp | 1 - src/core/hle/service/ns/pdm_qry.cpp | 1 - src/core/hle/service/sockets/bsd.cpp | 1 - src/core/network/sockets.h | 1 - src/core/reporter.cpp | 1 - 38 files changed, 8 insertions(+), 54 deletions(-) diff --git a/src/core/arm/dynarmic/arm_exclusive_monitor.h b/src/core/arm/dynarmic/arm_exclusive_monitor.h index 5a15b43ef4..b82c77f764 100644 --- a/src/core/arm/dynarmic/arm_exclusive_monitor.h +++ b/src/core/arm/dynarmic/arm_exclusive_monitor.h @@ -4,8 +4,6 @@ #pragma once -#include - #include #include "common/common_types.h" diff --git a/src/core/core.cpp b/src/core/core.cpp index c60a784c3e..b5e2bcae2e 100644 --- a/src/core/core.cpp +++ b/src/core/core.cpp @@ -38,7 +38,6 @@ #include "core/hle/service/apm/apm_controller.h" #include "core/hle/service/filesystem/filesystem.h" #include "core/hle/service/glue/glue_manager.h" -#include "core/hle/service/hid/hid.h" #include "core/hle/service/service.h" #include "core/hle/service/sm/sm.h" #include "core/hle/service/time/time_manager.h" diff --git a/src/core/crypto/key_manager.h b/src/core/crypto/key_manager.h index ac1eb89627..34ea5bbd4c 100644 --- a/src/core/crypto/key_manager.h +++ b/src/core/crypto/key_manager.h @@ -5,7 +5,6 @@ #pragma once #include -#include #include #include #include @@ -16,6 +15,10 @@ #include "common/common_types.h" #include "core/crypto/partition_data_manager.h" +namespace std::filesystem { +class path; +} + namespace Common::FS { class IOFile; } diff --git a/src/core/file_sys/directory.h b/src/core/file_sys/directory.h index 21c7aefc83..9a3b62117e 100644 --- a/src/core/file_sys/directory.h +++ b/src/core/file_sys/directory.h @@ -5,7 +5,6 @@ #pragma once #include -#include #include "common/common_funcs.h" #include "common/common_types.h" diff --git a/src/core/file_sys/patch_manager.cpp b/src/core/file_sys/patch_manager.cpp index f19ac46074..5882b971b7 100644 --- a/src/core/file_sys/patch_manager.cpp +++ b/src/core/file_sys/patch_manager.cpp @@ -10,7 +10,6 @@ #include "common/hex_util.h" #include "common/logging/log.h" #include "common/settings.h" -#include "common/string_util.h" #include "core/core.h" #include "core/file_sys/common_funcs.h" #include "core/file_sys/content_archive.h" diff --git a/src/core/frontend/applets/mii.h b/src/core/frontend/applets/mii.h index 1fc40a9c62..11ba8a3598 100644 --- a/src/core/frontend/applets/mii.h +++ b/src/core/frontend/applets/mii.h @@ -6,7 +6,6 @@ #include -#include "core/hle/result.h" #include "core/hle/service/mii/mii_manager.h" namespace Core::Frontend { diff --git a/src/core/hle/kernel/hle_ipc.cpp b/src/core/hle/kernel/hle_ipc.cpp index 9f2175f820..42d1b0e31d 100644 --- a/src/core/hle/kernel/hle_ipc.cpp +++ b/src/core/hle/kernel/hle_ipc.cpp @@ -17,7 +17,6 @@ #include "core/hle/kernel/k_auto_object.h" #include "core/hle/kernel/k_handle_table.h" #include "core/hle/kernel/k_process.h" -#include "core/hle/kernel/k_readable_event.h" #include "core/hle/kernel/k_server_session.h" #include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/kernel.h" diff --git a/src/core/hle/kernel/k_class_token.h b/src/core/hle/kernel/k_class_token.h index 980010150f..93fc8786da 100644 --- a/src/core/hle/kernel/k_class_token.h +++ b/src/core/hle/kernel/k_class_token.h @@ -4,8 +4,6 @@ #pragma once -#include - #include "common/bit_util.h" #include "common/common_types.h" diff --git a/src/core/hle/kernel/k_code_memory.cpp b/src/core/hle/kernel/k_code_memory.cpp index 0b225e8e03..b365ce7b7b 100644 --- a/src/core/hle/kernel/k_code_memory.cpp +++ b/src/core/hle/kernel/k_code_memory.cpp @@ -5,7 +5,6 @@ #include "common/alignment.h" #include "common/common_types.h" #include "core/device_memory.h" -#include "core/hle/kernel/k_auto_object.h" #include "core/hle/kernel/k_code_memory.h" #include "core/hle/kernel/k_light_lock.h" #include "core/hle/kernel/k_memory_block.h" diff --git a/src/core/hle/kernel/k_condition_variable.cpp b/src/core/hle/kernel/k_condition_variable.cpp index 8e2a9593c2..aa29922d02 100644 --- a/src/core/hle/kernel/k_condition_variable.cpp +++ b/src/core/hle/kernel/k_condition_variable.cpp @@ -9,7 +9,6 @@ #include "core/hle/kernel/k_process.h" #include "core/hle/kernel/k_scheduler.h" #include "core/hle/kernel/k_scoped_scheduler_lock_and_sleep.h" -#include "core/hle/kernel/k_synchronization_object.h" #include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_thread_queue.h" #include "core/hle/kernel/kernel.h" diff --git a/src/core/hle/kernel/k_memory_manager.cpp b/src/core/hle/kernel/k_memory_manager.cpp index a2f18f6435..17a1b76c7f 100644 --- a/src/core/hle/kernel/k_memory_manager.cpp +++ b/src/core/hle/kernel/k_memory_manager.cpp @@ -15,7 +15,6 @@ #include "core/hle/kernel/k_page_linked_list.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/svc_results.h" -#include "core/memory.h" namespace Kernel { diff --git a/src/core/hle/kernel/k_page_buffer.h b/src/core/hle/kernel/k_page_buffer.h index 6ff3c15683..1d11a4e273 100644 --- a/src/core/hle/kernel/k_page_buffer.h +++ b/src/core/hle/kernel/k_page_buffer.h @@ -7,7 +7,6 @@ #include #include "common/common_types.h" -#include "core/device_memory.h" #include "core/hle/kernel/memory_types.h" #include "core/hle/kernel/slab_helpers.h" diff --git a/src/core/hle/kernel/k_process.cpp b/src/core/hle/kernel/k_process.cpp index b394054969..490e31fc71 100644 --- a/src/core/hle/kernel/k_process.cpp +++ b/src/core/hle/kernel/k_process.cpp @@ -13,7 +13,6 @@ #include "common/scope_exit.h" #include "common/settings.h" #include "core/core.h" -#include "core/device_memory.h" #include "core/file_sys/program_metadata.h" #include "core/hle/kernel/code_set.h" #include "core/hle/kernel/k_memory_block_manager.h" @@ -24,7 +23,6 @@ #include "core/hle/kernel/k_scoped_resource_reservation.h" #include "core/hle/kernel/k_shared_memory.h" #include "core/hle/kernel/k_shared_memory_info.h" -#include "core/hle/kernel/k_slab_heap.h" #include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/svc_results.h" diff --git a/src/core/hle/kernel/k_process.h b/src/core/hle/kernel/k_process.h index 5ed0f2d83d..48b17fc749 100644 --- a/src/core/hle/kernel/k_process.h +++ b/src/core/hle/kernel/k_process.h @@ -8,7 +8,6 @@ #include #include #include -#include #include "common/common_types.h" #include "core/hle/kernel/k_address_arbiter.h" #include "core/hle/kernel/k_auto_object.h" diff --git a/src/core/hle/kernel/k_scheduler.cpp b/src/core/hle/kernel/k_scheduler.cpp index c965208287..6c0bb16725 100644 --- a/src/core/hle/kernel/k_scheduler.cpp +++ b/src/core/hle/kernel/k_scheduler.cpp @@ -22,7 +22,6 @@ #include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/physical_core.h" -#include "core/hle/kernel/time_manager.h" namespace Kernel { diff --git a/src/core/hle/kernel/k_thread.cpp b/src/core/hle/kernel/k_thread.cpp index ba7f72c6bc..94c8faf689 100644 --- a/src/core/hle/kernel/k_thread.cpp +++ b/src/core/hle/kernel/k_thread.cpp @@ -14,9 +14,7 @@ #include "common/common_types.h" #include "common/fiber.h" #include "common/logging/log.h" -#include "common/scope_exit.h" #include "common/settings.h" -#include "common/thread_queue_list.h" #include "core/core.h" #include "core/cpu_manager.h" #include "core/hardware_properties.h" @@ -33,7 +31,6 @@ #include "core/hle/kernel/k_worker_task_manager.h" #include "core/hle/kernel/kernel.h" #include "core/hle/kernel/svc_results.h" -#include "core/hle/kernel/time_manager.h" #include "core/hle/result.h" #include "core/memory.h" diff --git a/src/core/hle/kernel/k_thread_local_page.cpp b/src/core/hle/kernel/k_thread_local_page.cpp index 17b233fcae..3fb277eba0 100644 --- a/src/core/hle/kernel/k_thread_local_page.cpp +++ b/src/core/hle/kernel/k_thread_local_page.cpp @@ -4,7 +4,9 @@ #include "common/scope_exit.h" #include "core/core.h" + #include "core/hle/kernel/k_memory_block.h" +#include "core/hle/kernel/k_page_buffer.h" #include "core/hle/kernel/k_page_table.h" #include "core/hle/kernel/k_process.h" #include "core/hle/kernel/k_thread_local_page.h" diff --git a/src/core/hle/kernel/k_thread_local_page.h b/src/core/hle/kernel/k_thread_local_page.h index 658c67e942..74b565a71c 100644 --- a/src/core/hle/kernel/k_thread_local_page.h +++ b/src/core/hle/kernel/k_thread_local_page.h @@ -11,7 +11,6 @@ #include "common/assert.h" #include "common/common_types.h" #include "common/intrusive_red_black_tree.h" -#include "core/hle/kernel/k_page_buffer.h" #include "core/hle/kernel/memory_types.h" #include "core/hle/kernel/slab_helpers.h" #include "core/hle/result.h" diff --git a/src/core/hle/kernel/kernel.cpp b/src/core/hle/kernel/kernel.cpp index f9828bc43e..34da7c23b7 100644 --- a/src/core/hle/kernel/kernel.cpp +++ b/src/core/hle/kernel/kernel.cpp @@ -22,9 +22,7 @@ #include "core/arm/exclusive_monitor.h" #include "core/core.h" #include "core/core_timing.h" -#include "core/core_timing_util.h" #include "core/cpu_manager.h" -#include "core/device_memory.h" #include "core/hardware_properties.h" #include "core/hle/kernel/init/init_slab_setup.h" #include "core/hle/kernel/k_client_port.h" @@ -35,7 +33,6 @@ #include "core/hle/kernel/k_resource_limit.h" #include "core/hle/kernel/k_scheduler.h" #include "core/hle/kernel/k_shared_memory.h" -#include "core/hle/kernel/k_slab_heap.h" #include "core/hle/kernel/k_thread.h" #include "core/hle/kernel/k_worker_task_manager.h" #include "core/hle/kernel/kernel.h" diff --git a/src/core/hle/kernel/kernel.h b/src/core/hle/kernel/kernel.h index 7087bbda69..4c68e96dfc 100644 --- a/src/core/hle/kernel/kernel.h +++ b/src/core/hle/kernel/kernel.h @@ -14,7 +14,6 @@ #include "core/hardware_properties.h" #include "core/hle/kernel/k_auto_object.h" #include "core/hle/kernel/k_slab_heap.h" -#include "core/hle/kernel/memory_types.h" #include "core/hle/kernel/svc_common.h" namespace Core { diff --git a/src/core/hle/service/acc/acc.cpp b/src/core/hle/service/acc/acc.cpp index e34ef5a781..8a53329911 100644 --- a/src/core/hle/service/acc/acc.cpp +++ b/src/core/hle/service/acc/acc.cpp @@ -16,7 +16,6 @@ #include "core/file_sys/control_metadata.h" #include "core/file_sys/patch_manager.h" #include "core/hle/ipc_helpers.h" -#include "core/hle/kernel/kernel.h" #include "core/hle/service/acc/acc.h" #include "core/hle/service/acc/acc_aa.h" #include "core/hle/service/acc/acc_su.h" diff --git a/src/core/hle/service/am/applets/applet_mii.cpp b/src/core/hle/service/am/applets/applet_mii.cpp index 8c41737372..facede97e1 100644 --- a/src/core/hle/service/am/applets/applet_mii.cpp +++ b/src/core/hle/service/am/applets/applet_mii.cpp @@ -8,7 +8,6 @@ #include "core/frontend/applets/mii.h" #include "core/hle/service/am/am.h" #include "core/hle/service/am/applets/applet_mii.h" -#include "core/reporter.h" namespace Service::AM::Applets { diff --git a/src/core/hle/service/hid/controllers/console_sixaxis.cpp b/src/core/hle/service/hid/controllers/console_sixaxis.cpp index a727b35829..8450eaf937 100644 --- a/src/core/hle/service/hid/controllers/console_sixaxis.cpp +++ b/src/core/hle/service/hid/controllers/console_sixaxis.cpp @@ -2,7 +2,6 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include "common/settings.h" #include "core/core_timing.h" #include "core/hid/emulated_console.h" #include "core/hid/hid_core.h" diff --git a/src/core/hle/service/hid/controllers/console_sixaxis.h b/src/core/hle/service/hid/controllers/console_sixaxis.h index 26d153f0c2..93454585ad 100644 --- a/src/core/hle/service/hid/controllers/console_sixaxis.h +++ b/src/core/hle/service/hid/controllers/console_sixaxis.h @@ -8,7 +8,6 @@ #include "common/common_types.h" #include "common/quaternion.h" -#include "core/hid/hid_types.h" #include "core/hle/service/hid/controllers/controller_base.h" #include "core/hle/service/hid/ring_lifo.h" diff --git a/src/core/hle/service/hid/controllers/controller_base.h b/src/core/hle/service/hid/controllers/controller_base.h index 7450eb20a7..5e464149c8 100644 --- a/src/core/hle/service/hid/controllers/controller_base.h +++ b/src/core/hle/service/hid/controllers/controller_base.h @@ -5,7 +5,6 @@ #pragma once #include "common/common_types.h" -#include "common/swap.h" namespace Core::Timing { class CoreTiming; diff --git a/src/core/hle/service/hid/controllers/debug_pad.h b/src/core/hle/service/hid/controllers/debug_pad.h index afe374fc26..4396780a1e 100644 --- a/src/core/hle/service/hid/controllers/debug_pad.h +++ b/src/core/hle/service/hid/controllers/debug_pad.h @@ -4,11 +4,8 @@ #pragma once -#include #include "common/bit_field.h" -#include "common/common_funcs.h" #include "common/common_types.h" -#include "common/swap.h" #include "core/hle/service/hid/controllers/controller_base.h" #include "core/hle/service/hid/ring_lifo.h" diff --git a/src/core/hle/service/hid/controllers/keyboard.h b/src/core/hle/service/hid/controllers/keyboard.h index cf62d38961..b869352b91 100644 --- a/src/core/hle/service/hid/controllers/keyboard.h +++ b/src/core/hle/service/hid/controllers/keyboard.h @@ -4,11 +4,7 @@ #pragma once -#include -#include "common/bit_field.h" -#include "common/common_funcs.h" #include "common/common_types.h" -#include "common/swap.h" #include "core/hle/service/hid/controllers/controller_base.h" #include "core/hle/service/hid/ring_lifo.h" diff --git a/src/core/hle/service/hid/controllers/mouse.h b/src/core/hle/service/hid/controllers/mouse.h index 7559fc78d2..8858887b21 100644 --- a/src/core/hle/service/hid/controllers/mouse.h +++ b/src/core/hle/service/hid/controllers/mouse.h @@ -4,10 +4,7 @@ #pragma once -#include -#include "common/bit_field.h" #include "common/common_types.h" -#include "common/swap.h" #include "core/hle/service/hid/controllers/controller_base.h" #include "core/hle/service/hid/ring_lifo.h" diff --git a/src/core/hle/service/hid/controllers/npad.h b/src/core/hle/service/hid/controllers/npad.h index 6b2872bad6..3287cf4358 100644 --- a/src/core/hle/service/hid/controllers/npad.h +++ b/src/core/hle/service/hid/controllers/npad.h @@ -10,7 +10,8 @@ #include "common/bit_field.h" #include "common/common_types.h" -#include "common/quaternion.h" +#include "common/vector_math.h" + #include "core/hid/hid_types.h" #include "core/hle/service/hid/controllers/controller_base.h" #include "core/hle/service/hid/ring_lifo.h" diff --git a/src/core/hle/service/hid/controllers/touchscreen.cpp b/src/core/hle/service/hid/controllers/touchscreen.cpp index 48978e5c6a..65b799e783 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.cpp +++ b/src/core/hle/service/hid/controllers/touchscreen.cpp @@ -5,7 +5,6 @@ #include #include #include "common/common_types.h" -#include "common/logging/log.h" #include "common/settings.h" #include "core/core.h" #include "core/core_timing.h" diff --git a/src/core/hle/service/hid/controllers/touchscreen.h b/src/core/hle/service/hid/controllers/touchscreen.h index 708dde4f08..4835527674 100644 --- a/src/core/hle/service/hid/controllers/touchscreen.h +++ b/src/core/hle/service/hid/controllers/touchscreen.h @@ -4,11 +4,8 @@ #pragma once -#include "common/bit_field.h" #include "common/common_funcs.h" #include "common/common_types.h" -#include "common/point.h" -#include "common/swap.h" #include "core/hid/hid_types.h" #include "core/hle/service/hid/controllers/controller_base.h" #include "core/hle/service/hid/ring_lifo.h" diff --git a/src/core/hle/service/hid/controllers/xpad.h b/src/core/hle/service/hid/controllers/xpad.h index ba8db8d9d8..4973e1bd9d 100644 --- a/src/core/hle/service/hid/controllers/xpad.h +++ b/src/core/hle/service/hid/controllers/xpad.h @@ -5,9 +5,7 @@ #pragma once #include "common/bit_field.h" -#include "common/common_funcs.h" #include "common/common_types.h" -#include "common/swap.h" #include "core/hid/hid_types.h" #include "core/hle/service/hid/controllers/controller_base.h" #include "core/hle/service/hid/ring_lifo.h" diff --git a/src/core/hle/service/ldr/ldr.cpp b/src/core/hle/service/ldr/ldr.cpp index 0992764205..2477c56124 100644 --- a/src/core/hle/service/ldr/ldr.cpp +++ b/src/core/hle/service/ldr/ldr.cpp @@ -12,7 +12,6 @@ #include "core/core.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_page_table.h" -#include "core/hle/kernel/k_system_control.h" #include "core/hle/kernel/svc_results.h" #include "core/hle/kernel/svc_types.h" #include "core/hle/service/ldr/ldr.h" diff --git a/src/core/hle/service/nifm/nifm.cpp b/src/core/hle/service/nifm/nifm.cpp index a253dd0667..edb576ad3f 100644 --- a/src/core/hle/service/nifm/nifm.cpp +++ b/src/core/hle/service/nifm/nifm.cpp @@ -5,7 +5,6 @@ #include "core/core.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_event.h" -#include "core/hle/kernel/kernel.h" #include "core/hle/service/kernel_helpers.h" #include "core/hle/service/nifm/nifm.h" #include "core/hle/service/service.h" diff --git a/src/core/hle/service/ns/pdm_qry.cpp b/src/core/hle/service/ns/pdm_qry.cpp index 36ce463534..3a83d06988 100644 --- a/src/core/hle/service/ns/pdm_qry.cpp +++ b/src/core/hle/service/ns/pdm_qry.cpp @@ -9,7 +9,6 @@ #include "core/hle/ipc_helpers.h" #include "core/hle/service/ns/pdm_qry.h" #include "core/hle/service/service.h" -#include "core/hle/service/sm/sm.h" namespace Service::NS { diff --git a/src/core/hle/service/sockets/bsd.cpp b/src/core/hle/service/sockets/bsd.cpp index 3dbac5a23e..fc93fb7435 100644 --- a/src/core/hle/service/sockets/bsd.cpp +++ b/src/core/hle/service/sockets/bsd.cpp @@ -10,7 +10,6 @@ #include #include "common/microprofile.h" -#include "common/thread.h" #include "core/hle/ipc_helpers.h" #include "core/hle/kernel/k_thread.h" #include "core/hle/service/sockets/bsd.h" diff --git a/src/core/network/sockets.h b/src/core/network/sockets.h index a44393325b..5e39e7c540 100644 --- a/src/core/network/sockets.h +++ b/src/core/network/sockets.h @@ -8,7 +8,6 @@ #include #if defined(_WIN32) -#include #elif !YUZU_UNIX #error "Platform not implemented" #endif diff --git a/src/core/reporter.cpp b/src/core/reporter.cpp index d4becdc0a3..89faed6ee1 100644 --- a/src/core/reporter.cpp +++ b/src/core/reporter.cpp @@ -8,7 +8,6 @@ #include #include -#include #include #include "common/fs/file.h"