diff --git a/CHANGELOG.md b/CHANGELOG.md index d88ae649b..d6304f928 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,7 @@ - Dev: Ignore `WM_SHOWWINDOW` hide events, causing fewer attempted rescales. (#4198) - Dev: Migrated to C++ 20 (#4252, #4257) - Dev: Enable LTO for main branch builds. (#4258, #4260) +- Dev: Removed unused include directives. (#4266) ## 2.4.0 diff --git a/src/util/StreamerMode.cpp b/src/util/StreamerMode.cpp index 932bdeb6d..03f3f59aa 100644 --- a/src/util/StreamerMode.cpp +++ b/src/util/StreamerMode.cpp @@ -1,4 +1,4 @@ -#include "StreamerMode.hpp" +#include "util/StreamerMode.hpp" #include "Application.hpp" #include "common/QLogging.hpp" @@ -11,18 +11,18 @@ #include "widgets/splits/Split.hpp" #include "widgets/Window.hpp" +#include + #ifdef USEWINSDK // clang-format off +// These imports cannot be ordered alphabetically. # include - # include # include -# pragma comment(lib, "Wtsapi32.lib") // clang-format on +# pragma comment(lib, "Wtsapi32.lib") #endif -#include - namespace chatterino { constexpr int cooldownInS = 10; diff --git a/src/util/WindowsHelper.hpp b/src/util/WindowsHelper.hpp index 655cdbb66..f39e66512 100644 --- a/src/util/WindowsHelper.hpp +++ b/src/util/WindowsHelper.hpp @@ -2,10 +2,8 @@ #ifdef USEWINSDK -// clang-format off -# include # include -// clang-format on +# include namespace chatterino { diff --git a/src/widgets/AttachedWindow.cpp b/src/widgets/AttachedWindow.cpp index 88a8432d1..57a879641 100644 --- a/src/widgets/AttachedWindow.cpp +++ b/src/widgets/AttachedWindow.cpp @@ -1,4 +1,4 @@ -#include "AttachedWindow.hpp" +#include "widgets/AttachedWindow.hpp" #include "Application.hpp" #include "common/QLogging.hpp" @@ -13,14 +13,14 @@ #include #ifdef USEWINSDK -// clang-format off # include "util/WindowsHelper.hpp" -# include "Windows.h" +// clang-format off // don't even think about reordering these +# include "Windows.h" # include "Psapi.h" -# pragma comment(lib, "Dwmapi.lib") // clang-format on +# pragma comment(lib, "Dwmapi.lib") #endif namespace chatterino { diff --git a/src/widgets/BaseWindow.cpp b/src/widgets/BaseWindow.cpp index 8fec3fb07..a4b1b7093 100644 --- a/src/widgets/BaseWindow.cpp +++ b/src/widgets/BaseWindow.cpp @@ -1,7 +1,6 @@ -#include "BaseWindow.hpp" +#include "widgets/BaseWindow.hpp" #include "BaseSettings.hpp" -#include "boost/algorithm/algorithm.hpp" #include "singletons/Theme.hpp" #include "util/DebugCount.hpp" #include "util/PostToThread.hpp" @@ -11,7 +10,6 @@ #include "widgets/TooltipWidget.hpp" #include -#include #include #include #include @@ -24,22 +22,16 @@ #endif #ifdef USEWINSDK -// clang-format off -# include +# include # include # include -# include -# include # include -//#include # pragma comment(lib, "Dwmapi.lib") # include -# include # define WM_DPICHANGED 0x02E0 -// clang-format on #endif #include "widgets/helper/TitlebarButton.hpp" diff --git a/src/widgets/FramelessEmbedWindow.cpp b/src/widgets/FramelessEmbedWindow.cpp index e17e95ac1..9633e241d 100644 --- a/src/widgets/FramelessEmbedWindow.cpp +++ b/src/widgets/FramelessEmbedWindow.cpp @@ -1,14 +1,13 @@ -#include "FramelessEmbedWindow.hpp" +#include "widgets/FramelessEmbedWindow.hpp" #include "Application.hpp" +#include "common/Args.hpp" #include "providers/twitch/TwitchIrcServer.hpp" -#include "QJsonDocument" -#include "QMessageBox" +#include "widgets/splits/Split.hpp" #include -//#include "widgets/helper/ChannelView.hpp" -#include "common/Args.hpp" -#include "widgets/splits/Split.hpp" +#include +#include #ifdef USEWINSDK # include "Windows.h"