From 923decae5a5098cb9d254e008ed61fc5e07ced38 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Sat, 19 Mar 2022 00:23:48 -0400 Subject: [PATCH] common: Reduce unused includes --- src/common/alignment.h | 1 - src/common/atomic_ops.h | 3 --- src/common/bit_field.h | 1 - src/common/dynamic_library.cpp | 1 - src/common/hex_util.h | 1 - src/common/host_memory.cpp | 1 - src/common/intrusive_red_black_tree.h | 1 - src/common/logging/text_formatter.cpp | 2 -- src/common/logging/text_formatter.h | 1 - src/common/memory_detect.cpp | 2 +- src/common/nvidia_flags.cpp | 1 - src/common/page_table.h | 1 - src/common/parent_of_member.h | 1 - src/common/ring_buffer.h | 1 - src/common/string_util.cpp | 2 -- src/common/telemetry.cpp | 1 - src/common/telemetry.h | 1 - src/common/thread.cpp | 1 - src/common/uint128.h | 1 - src/common/uuid.h | 1 - src/common/virtual_buffer.h | 1 - src/common/wall_clock.cpp | 2 -- src/common/x64/cpu_detect.cpp | 1 - src/common/x64/native_clock.cpp | 2 -- src/common/x64/native_clock.h | 2 -- src/core/file_sys/program_metadata.h | 2 ++ src/core/hle/service/acc/profile_manager.h | 1 + src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h | 2 ++ src/core/hle/service/nvdrv/devices/nvhost_gpu.h | 1 + src/video_core/cdma_pusher.h | 1 + 30 files changed, 8 insertions(+), 32 deletions(-) diff --git a/src/common/alignment.h b/src/common/alignment.h index 8570c7d3c4..e4653bf357 100644 --- a/src/common/alignment.h +++ b/src/common/alignment.h @@ -3,7 +3,6 @@ #pragma once #include -#include #include namespace Common { diff --git a/src/common/atomic_ops.h b/src/common/atomic_ops.h index 2b1f515e8a..c488489eae 100644 --- a/src/common/atomic_ops.h +++ b/src/common/atomic_ops.h @@ -4,9 +4,6 @@ #pragma once -#include -#include - #include "common/common_types.h" #if _MSC_VER diff --git a/src/common/bit_field.h b/src/common/bit_field.h index 0f0661172c..7f8620e7d9 100644 --- a/src/common/bit_field.h +++ b/src/common/bit_field.h @@ -33,7 +33,6 @@ #include #include #include -#include "common/common_funcs.h" #include "common/swap.h" /* diff --git a/src/common/dynamic_library.cpp b/src/common/dynamic_library.cpp index 7f0a105217..11003e1d63 100644 --- a/src/common/dynamic_library.cpp +++ b/src/common/dynamic_library.cpp @@ -2,7 +2,6 @@ // Licensed under GPLv2+ // Refer to the license.txt file included. -#include #include #include diff --git a/src/common/hex_util.h b/src/common/hex_util.h index 5e9b6ef8b5..323c8fb330 100644 --- a/src/common/hex_util.h +++ b/src/common/hex_util.h @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include "common/common_types.h" diff --git a/src/common/host_memory.cpp b/src/common/host_memory.cpp index c465cfc14b..229fbe91ee 100644 --- a/src/common/host_memory.cpp +++ b/src/common/host_memory.cpp @@ -27,7 +27,6 @@ #include "common/assert.h" #include "common/host_memory.h" #include "common/logging/log.h" -#include "common/scope_exit.h" namespace Common { diff --git a/src/common/intrusive_red_black_tree.h b/src/common/intrusive_red_black_tree.h index b296b639e2..eaf5675e38 100644 --- a/src/common/intrusive_red_black_tree.h +++ b/src/common/intrusive_red_black_tree.h @@ -4,7 +4,6 @@ #pragma once -#include "common/alignment.h" #include "common/common_funcs.h" #include "common/parent_of_member.h" #include "common/tree.h" diff --git a/src/common/logging/text_formatter.cpp b/src/common/logging/text_formatter.cpp index 10b2281db1..b2cad58d87 100644 --- a/src/common/logging/text_formatter.cpp +++ b/src/common/logging/text_formatter.cpp @@ -10,12 +10,10 @@ #endif #include "common/assert.h" -#include "common/common_funcs.h" #include "common/logging/filter.h" #include "common/logging/log.h" #include "common/logging/log_entry.h" #include "common/logging/text_formatter.h" -#include "common/string_util.h" namespace Common::Log { diff --git a/src/common/logging/text_formatter.h b/src/common/logging/text_formatter.h index 171e74cfed..92c0bf0c53 100644 --- a/src/common/logging/text_formatter.h +++ b/src/common/logging/text_formatter.h @@ -4,7 +4,6 @@ #pragma once -#include #include namespace Common::Log { diff --git a/src/common/memory_detect.cpp b/src/common/memory_detect.cpp index 8cff6ec379..7a75a5ff4e 100644 --- a/src/common/memory_detect.cpp +++ b/src/common/memory_detect.cpp @@ -70,4 +70,4 @@ const MemoryInfo& GetMemInfo() { return mem_info; } -} // namespace Common \ No newline at end of file +} // namespace Common diff --git a/src/common/nvidia_flags.cpp b/src/common/nvidia_flags.cpp index d1afd1f1de..c732c233ee 100644 --- a/src/common/nvidia_flags.cpp +++ b/src/common/nvidia_flags.cpp @@ -6,7 +6,6 @@ #include -#include "common/fs/file.h" #include "common/fs/fs.h" #include "common/fs/path_util.h" #include "common/nvidia_flags.h" diff --git a/src/common/page_table.h b/src/common/page_table.h index 82d91e9f3c..13f4b44c0e 100644 --- a/src/common/page_table.h +++ b/src/common/page_table.h @@ -5,7 +5,6 @@ #pragma once #include -#include #include "common/common_types.h" #include "common/virtual_buffer.h" diff --git a/src/common/parent_of_member.h b/src/common/parent_of_member.h index 58c70b0e77..ad075615b0 100644 --- a/src/common/parent_of_member.h +++ b/src/common/parent_of_member.h @@ -7,7 +7,6 @@ #include #include "common/assert.h" -#include "common/common_types.h" namespace Common { namespace detail { diff --git a/src/common/ring_buffer.h b/src/common/ring_buffer.h index 4a8d09806c..db6aa6b950 100644 --- a/src/common/ring_buffer.h +++ b/src/common/ring_buffer.h @@ -12,7 +12,6 @@ #include #include #include -#include "common/common_types.h" namespace Common { diff --git a/src/common/string_util.cpp b/src/common/string_util.cpp index 6621711386..3695dae4d7 100644 --- a/src/common/string_util.cpp +++ b/src/common/string_util.cpp @@ -5,11 +5,9 @@ #include #include #include -#include #include #include -#include "common/logging/log.h" #include "common/string_util.h" #ifdef _WIN32 diff --git a/src/common/telemetry.cpp b/src/common/telemetry.cpp index 98c82cd17e..67261c55be 100644 --- a/src/common/telemetry.cpp +++ b/src/common/telemetry.cpp @@ -4,7 +4,6 @@ #include #include -#include "common/assert.h" #include "common/scm_rev.h" #include "common/telemetry.h" diff --git a/src/common/telemetry.h b/src/common/telemetry.h index 3524c857e0..f9a824a7d3 100644 --- a/src/common/telemetry.h +++ b/src/common/telemetry.h @@ -8,7 +8,6 @@ #include #include #include -#include #include "common/common_funcs.h" #include "common/common_types.h" diff --git a/src/common/thread.cpp b/src/common/thread.cpp index 946a1114d5..91c8a8e13f 100644 --- a/src/common/thread.cpp +++ b/src/common/thread.cpp @@ -4,7 +4,6 @@ #include -#include "common/error.h" #include "common/logging/log.h" #include "common/thread.h" #ifdef __APPLE__ diff --git a/src/common/uint128.h b/src/common/uint128.h index 4780b2f9d3..1ed5d65079 100644 --- a/src/common/uint128.h +++ b/src/common/uint128.h @@ -4,7 +4,6 @@ #pragma once -#include #include #ifdef _MSC_VER diff --git a/src/common/uuid.h b/src/common/uuid.h index fe31e64e60..c450d9e202 100644 --- a/src/common/uuid.h +++ b/src/common/uuid.h @@ -7,7 +7,6 @@ #include #include #include -#include #include "common/common_types.h" diff --git a/src/common/virtual_buffer.h b/src/common/virtual_buffer.h index fb1a6f81f6..cac4f48955 100644 --- a/src/common/virtual_buffer.h +++ b/src/common/virtual_buffer.h @@ -4,7 +4,6 @@ #pragma once -#include #include namespace Common { diff --git a/src/common/wall_clock.cpp b/src/common/wall_clock.cpp index 9acf7551ef..f30d916922 100644 --- a/src/common/wall_clock.cpp +++ b/src/common/wall_clock.cpp @@ -2,8 +2,6 @@ // Licensed under GPLv2 or any later version // Refer to the license.txt file included. -#include - #include "common/uint128.h" #include "common/wall_clock.h" diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index d81edb1404..f5296b32af 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp @@ -4,7 +4,6 @@ #include #include #include -#include #include #include "common/bit_util.h" #include "common/common_types.h" diff --git a/src/common/x64/native_clock.cpp b/src/common/x64/native_clock.cpp index 91b842829b..347e41efcc 100644 --- a/src/common/x64/native_clock.cpp +++ b/src/common/x64/native_clock.cpp @@ -4,8 +4,6 @@ #include #include -#include -#include #include #include "common/atomic_ops.h" diff --git a/src/common/x64/native_clock.h b/src/common/x64/native_clock.h index 7cbd400d22..2c3082ea0a 100644 --- a/src/common/x64/native_clock.h +++ b/src/common/x64/native_clock.h @@ -4,8 +4,6 @@ #pragma once -#include - #include "common/wall_clock.h" namespace Common { diff --git a/src/core/file_sys/program_metadata.h b/src/core/file_sys/program_metadata.h index 1eee916be9..32435e1237 100644 --- a/src/core/file_sys/program_metadata.h +++ b/src/core/file_sys/program_metadata.h @@ -6,7 +6,9 @@ #include #include + #include "common/bit_field.h" +#include "common/common_funcs.h" #include "common/common_types.h" #include "common/swap.h" #include "core/file_sys/vfs_types.h" diff --git a/src/core/hle/service/acc/profile_manager.h b/src/core/hle/service/acc/profile_manager.h index 17347f7ef7..5b690b4061 100644 --- a/src/core/hle/service/acc/profile_manager.h +++ b/src/core/hle/service/acc/profile_manager.h @@ -7,6 +7,7 @@ #include #include +#include "common/common_funcs.h" #include "common/common_types.h" #include "common/swap.h" #include "common/uuid.h" diff --git a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h index 898d00a17a..f434f69291 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_ctrl_gpu.h @@ -5,6 +5,8 @@ #pragma once #include + +#include "common/common_funcs.h" #include "common/common_types.h" #include "common/swap.h" #include "core/hle/service/nvdrv/devices/nvdevice.h" diff --git a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h index f27a82bff2..3e4f3b6a70 100644 --- a/src/core/hle/service/nvdrv/devices/nvhost_gpu.h +++ b/src/core/hle/service/nvdrv/devices/nvhost_gpu.h @@ -7,6 +7,7 @@ #include #include #include "common/bit_field.h" +#include "common/common_funcs.h" #include "common/common_types.h" #include "common/swap.h" #include "core/hle/service/nvdrv/devices/nvdevice.h" diff --git a/src/video_core/cdma_pusher.h b/src/video_core/cdma_pusher.h index 87b49d6ea7..cb1d16b713 100644 --- a/src/video_core/cdma_pusher.h +++ b/src/video_core/cdma_pusher.h @@ -8,6 +8,7 @@ #include #include "common/bit_field.h" +#include "common/common_funcs.h" #include "common/common_types.h" namespace Tegra {