From c2a900b8535df96c931b1c2b93765f5bca468fd7 Mon Sep 17 00:00:00 2001 From: Ben Wiederhake Date: Mon, 2 Jan 2023 16:57:12 +0100 Subject: [PATCH] Everywhere: Remove unused includes of AK/StdLibExtras.h These instances were detected by searching for files that include AK/StdLibExtras.h, but don't match the regex: \\b(abs|AK_REPLACED_STD_NAMESPACE|array_size|ceil_div|clamp|exchange|for ward|is_constant_evaluated|is_power_of_two|max|min|mix|move|_RawPtr|RawP tr|round_up_to_power_of_two|swap|to_underlying)\\b (Without the linebreaks.) This regex is pessimistic, so there might be more files that don't actually use any "extra stdlib" functions. In theory, one might use LibCPP to detect things like this automatically, but let's do this one step after another. --- AK/AtomicRefCounted.h | 1 - AK/CheckedFormatString.h | 1 - AK/EnumBits.h | 2 +- AK/RefCounted.h | 1 - AK/StringBuilder.cpp | 1 - AK/StringImpl.cpp | 1 - AK/TypeCasts.h | 1 - AK/Userspace.h | 1 - Kernel/Arch/x86_64/DescriptorTable.h | 1 - Kernel/Devices/MemoryDevice.cpp | 1 - Kernel/Net/TCP.h | 1 - Tests/AK/TestSpan.cpp | 1 - Tests/AK/TestTypeTraits.cpp | 1 - Userland/Libraries/LibC/pthread.cpp | 1 - Userland/Libraries/LibC/scanf.cpp | 1 - Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h | 1 - Userland/Libraries/LibGfx/Filters/SepiaFilter.h | 1 - Userland/Libraries/LibGfx/Filters/SpatialGaussianBlurFilter.h | 1 - Userland/Libraries/LibGfx/Line.h | 1 - Userland/Libraries/LibGfx/Rect.cpp | 1 - Userland/Libraries/LibPDF/Forward.h | 1 - Userland/Libraries/LibWeb/Bindings/ExceptionOrUtils.h | 1 - Userland/Libraries/LibWeb/HighResolutionTime/Performance.h | 1 - Userland/Libraries/LibWeb/NavigationTiming/PerformanceTiming.h | 1 - Userland/Libraries/LibWeb/RequestIdleCallback/IdleDeadline.h | 1 - 25 files changed, 1 insertion(+), 25 deletions(-) diff --git a/AK/AtomicRefCounted.h b/AK/AtomicRefCounted.h index a0ba860b0f4..91b79bd97ff 100644 --- a/AK/AtomicRefCounted.h +++ b/AK/AtomicRefCounted.h @@ -11,7 +11,6 @@ #include #include #include -#include namespace AK { diff --git a/AK/CheckedFormatString.h b/AK/CheckedFormatString.h index 556f25c8090..749899413e2 100644 --- a/AK/CheckedFormatString.h +++ b/AK/CheckedFormatString.h @@ -9,7 +9,6 @@ #include #include #include -#include #include #ifdef ENABLE_COMPILETIME_FORMAT_CHECK diff --git a/AK/EnumBits.h b/AK/EnumBits.h index 4b8f8508f51..c97fc47527b 100644 --- a/AK/EnumBits.h +++ b/AK/EnumBits.h @@ -6,7 +6,7 @@ #pragma once -#include +#include // Enables bitwise operators for the specified Enum type. // diff --git a/AK/RefCounted.h b/AK/RefCounted.h index 7f5eb5eb198..212bd5682c2 100644 --- a/AK/RefCounted.h +++ b/AK/RefCounted.h @@ -10,7 +10,6 @@ #include #include #include -#include namespace AK { diff --git a/AK/StringBuilder.cpp b/AK/StringBuilder.cpp index ad161a2e1ea..0c43664450e 100644 --- a/AK/StringBuilder.cpp +++ b/AK/StringBuilder.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/AK/StringImpl.cpp b/AK/StringImpl.cpp index c31d709ca9d..a5251521d97 100644 --- a/AK/StringImpl.cpp +++ b/AK/StringImpl.cpp @@ -8,7 +8,6 @@ #include #include #include -#include #include #include #include diff --git a/AK/TypeCasts.h b/AK/TypeCasts.h index 44a167b8458..eafb23f6668 100644 --- a/AK/TypeCasts.h +++ b/AK/TypeCasts.h @@ -9,7 +9,6 @@ #include #include #include -#include namespace AK { diff --git a/AK/Userspace.h b/AK/Userspace.h index c22b051200a..62bf0d10d4e 100644 --- a/AK/Userspace.h +++ b/AK/Userspace.h @@ -7,7 +7,6 @@ #pragma once #include -#include #include #ifdef KERNEL diff --git a/Kernel/Arch/x86_64/DescriptorTable.h b/Kernel/Arch/x86_64/DescriptorTable.h index 8eefd85cfa8..623325c12a1 100644 --- a/Kernel/Arch/x86_64/DescriptorTable.h +++ b/Kernel/Arch/x86_64/DescriptorTable.h @@ -7,7 +7,6 @@ #pragma once -#include #include #include diff --git a/Kernel/Devices/MemoryDevice.cpp b/Kernel/Devices/MemoryDevice.cpp index 73cb912be8d..454bd28615a 100644 --- a/Kernel/Devices/MemoryDevice.cpp +++ b/Kernel/Devices/MemoryDevice.cpp @@ -5,7 +5,6 @@ */ #include -#include #include #include #include diff --git a/Kernel/Net/TCP.h b/Kernel/Net/TCP.h index a517089b8e4..c843b5dda0d 100644 --- a/Kernel/Net/TCP.h +++ b/Kernel/Net/TCP.h @@ -6,7 +6,6 @@ #pragma once -#include #include namespace Kernel { diff --git a/Tests/AK/TestSpan.cpp b/Tests/AK/TestSpan.cpp index 27add01cc17..cb0eb626d33 100644 --- a/Tests/AK/TestSpan.cpp +++ b/Tests/AK/TestSpan.cpp @@ -8,7 +8,6 @@ #include #include -#include #include TEST_CASE(constexpr_default_constructor_is_empty) diff --git a/Tests/AK/TestTypeTraits.cpp b/Tests/AK/TestTypeTraits.cpp index 787452f5ffe..fcd0e061c1f 100644 --- a/Tests/AK/TestTypeTraits.cpp +++ b/Tests/AK/TestTypeTraits.cpp @@ -6,7 +6,6 @@ #include -#include #include #define STATIC_EXPECT_EQ(lhs, rhs) \ diff --git a/Userland/Libraries/LibC/pthread.cpp b/Userland/Libraries/LibC/pthread.cpp index 32e7b868c26..ab7c5e25f90 100644 --- a/Userland/Libraries/LibC/pthread.cpp +++ b/Userland/Libraries/LibC/pthread.cpp @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/Userland/Libraries/LibC/scanf.cpp b/Userland/Libraries/LibC/scanf.cpp index 2d4705ea586..a7c4c64601a 100644 --- a/Userland/Libraries/LibC/scanf.cpp +++ b/Userland/Libraries/LibC/scanf.cpp @@ -7,7 +7,6 @@ #include #include #include -#include #include #include #include diff --git a/Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h b/Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h index b9a7f37106f..cd0c5db97cb 100644 --- a/Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h +++ b/Userland/Libraries/LibCrypto/Cipher/Mode/Mode.h @@ -8,7 +8,6 @@ #include #include -#include #include namespace Crypto { diff --git a/Userland/Libraries/LibGfx/Filters/SepiaFilter.h b/Userland/Libraries/LibGfx/Filters/SepiaFilter.h index 86ca152cd05..63bebe743ab 100644 --- a/Userland/Libraries/LibGfx/Filters/SepiaFilter.h +++ b/Userland/Libraries/LibGfx/Filters/SepiaFilter.h @@ -6,7 +6,6 @@ #pragma once -#include #include #include #include diff --git a/Userland/Libraries/LibGfx/Filters/SpatialGaussianBlurFilter.h b/Userland/Libraries/LibGfx/Filters/SpatialGaussianBlurFilter.h index 50cfc73bc03..350b5564b27 100644 --- a/Userland/Libraries/LibGfx/Filters/SpatialGaussianBlurFilter.h +++ b/Userland/Libraries/LibGfx/Filters/SpatialGaussianBlurFilter.h @@ -7,7 +7,6 @@ #pragma once #include "GenericConvolutionFilter.h" -#include #include namespace Gfx { diff --git a/Userland/Libraries/LibGfx/Line.h b/Userland/Libraries/LibGfx/Line.h index 487cb7a2dfb..6192a705a2f 100644 --- a/Userland/Libraries/LibGfx/Line.h +++ b/Userland/Libraries/LibGfx/Line.h @@ -9,7 +9,6 @@ #include #include #include -#include #include #include #include diff --git a/Userland/Libraries/LibGfx/Rect.cpp b/Userland/Libraries/LibGfx/Rect.cpp index 68bbfd4ead4..7ab90853d8b 100644 --- a/Userland/Libraries/LibGfx/Rect.cpp +++ b/Userland/Libraries/LibGfx/Rect.cpp @@ -5,7 +5,6 @@ */ #include -#include #include #include #include diff --git a/Userland/Libraries/LibPDF/Forward.h b/Userland/Libraries/LibPDF/Forward.h index c93b3c6c104..3bd19c7c4c9 100644 --- a/Userland/Libraries/LibPDF/Forward.h +++ b/Userland/Libraries/LibPDF/Forward.h @@ -7,7 +7,6 @@ #pragma once #include -#include namespace PDF { diff --git a/Userland/Libraries/LibWeb/Bindings/ExceptionOrUtils.h b/Userland/Libraries/LibWeb/Bindings/ExceptionOrUtils.h index e96c82a73c7..60935a0dc66 100644 --- a/Userland/Libraries/LibWeb/Bindings/ExceptionOrUtils.h +++ b/Userland/Libraries/LibWeb/Bindings/ExceptionOrUtils.h @@ -7,7 +7,6 @@ #pragma once #include -#include #include #include diff --git a/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h b/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h index b06b97d46ca..b2b8cd01f45 100644 --- a/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h +++ b/Userland/Libraries/LibWeb/HighResolutionTime/Performance.h @@ -6,7 +6,6 @@ #pragma once -#include #include #include diff --git a/Userland/Libraries/LibWeb/NavigationTiming/PerformanceTiming.h b/Userland/Libraries/LibWeb/NavigationTiming/PerformanceTiming.h index 3310d45d90e..9bdadcb6724 100644 --- a/Userland/Libraries/LibWeb/NavigationTiming/PerformanceTiming.h +++ b/Userland/Libraries/LibWeb/NavigationTiming/PerformanceTiming.h @@ -6,7 +6,6 @@ #pragma once -#include #include namespace Web::NavigationTiming { diff --git a/Userland/Libraries/LibWeb/RequestIdleCallback/IdleDeadline.h b/Userland/Libraries/LibWeb/RequestIdleCallback/IdleDeadline.h index 8e08ca07474..23d546889b5 100644 --- a/Userland/Libraries/LibWeb/RequestIdleCallback/IdleDeadline.h +++ b/Userland/Libraries/LibWeb/RequestIdleCallback/IdleDeadline.h @@ -7,7 +7,6 @@ #pragma once -#include #include namespace Web::RequestIdleCallback {