From e327ed416685c4de067dbf7e4498e63a8c67a447 Mon Sep 17 00:00:00 2001 From: pajlada Date: Fri, 1 Dec 2023 15:03:04 +0100 Subject: [PATCH] Update magic_enum from v0.9.3 to v0.9.5 (#4992) * Fix include path for magic enum * Update .clang-format to ensure magic enum is caught as a third party library --- CHANGELOG.md | 1 + benchmarks/.clang-format | 9 +++------ cmake/FindMagicEnum.cmake | 2 +- lib/magic_enum | 2 +- mocks/.clang-format | 9 +++------ src/.clang-format | 9 +++------ src/common/ChatterinoSetting.hpp | 2 +- src/controllers/plugins/LuaUtilities.hpp | 2 +- src/controllers/plugins/Plugin.cpp | 2 +- src/providers/seventv/SeventvCosmetics.hpp | 2 +- src/providers/seventv/eventapi/Message.hpp | 2 +- src/providers/seventv/eventapi/Subscription.hpp | 2 +- src/providers/twitch/api/Helix.cpp | 2 +- src/providers/twitch/pubsubmessages/AutoMod.hpp | 2 +- src/providers/twitch/pubsubmessages/Base.hpp | 2 +- src/providers/twitch/pubsubmessages/ChannelPoints.hpp | 2 +- .../twitch/pubsubmessages/ChatModeratorAction.hpp | 2 +- src/providers/twitch/pubsubmessages/Whisper.hpp | 2 +- src/widgets/settingspages/GeneralPage.cpp | 2 +- tests/.clang-format | 9 +++------ 20 files changed, 28 insertions(+), 39 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 845d117b4..5cf1e8662 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -61,6 +61,7 @@ - Dev: Add a compile-time flag `CHATTERINO_UPDATER` which can be turned off to disable update checks. (#4854) - Dev: Add a compile-time flag `USE_SYSTEM_MINIAUDIO` which can be turned on to use the system miniaudio. (#4867) - Dev: Update vcpkg to use Qt6. (#4872) +- Dev: Update `magic_enum` to v0.9.5. (#4992) - Dev: Replace `boost::optional` with `std::optional`. (#4877) - Dev: Improve performance of selecting text. (#4889, #4911) - Dev: Removed direct dependency on Qt 5 compatibility module. (#4906) diff --git a/benchmarks/.clang-format b/benchmarks/.clang-format index 7bae09f2c..0feaad9dc 100644 --- a/benchmarks/.clang-format +++ b/benchmarks/.clang-format @@ -32,9 +32,6 @@ IncludeCategories: # Project includes - Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$' Priority: 1 - # Third party library includes - - Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>' - Priority: 3 # Qt includes - Regex: '^$' Priority: 3 @@ -42,12 +39,12 @@ IncludeCategories: # LibCommuni includes - Regex: "^$" Priority: 3 - # Misc libraries - - Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$' - Priority: 3 # Standard library includes - Regex: "^<[a-zA-Z_]+>$" Priority: 4 + # Third party library includes + - Regex: "^<([a-zA-Z_0-9-]+/)*[a-zA-Z_0-9-]+.h(pp)?>$" + Priority: 3 NamespaceIndentation: Inner PointerBindsToType: false SpacesBeforeTrailingComments: 2 diff --git a/cmake/FindMagicEnum.cmake b/cmake/FindMagicEnum.cmake index 0a77bd279..b595075ca 100644 --- a/cmake/FindMagicEnum.cmake +++ b/cmake/FindMagicEnum.cmake @@ -1,6 +1,6 @@ include(FindPackageHandleStandardArgs) -find_path(MagicEnum_INCLUDE_DIR magic_enum.hpp HINTS ${CMAKE_SOURCE_DIR}/lib/magic_enum/include) +find_path(MagicEnum_INCLUDE_DIR magic_enum/magic_enum.hpp HINTS ${CMAKE_SOURCE_DIR}/lib/magic_enum/include) find_package_handle_standard_args(MagicEnum DEFAULT_MSG MagicEnum_INCLUDE_DIR) diff --git a/lib/magic_enum b/lib/magic_enum index e1a68e9dd..e55b9b54d 160000 --- a/lib/magic_enum +++ b/lib/magic_enum @@ -1 +1 @@ -Subproject commit e1a68e9dd3d2e9180b04c8aeacd4975db745e6b8 +Subproject commit e55b9b54d5cf61f8e117cafb17846d7d742dd3b4 diff --git a/mocks/.clang-format b/mocks/.clang-format index 7bae09f2c..0feaad9dc 100644 --- a/mocks/.clang-format +++ b/mocks/.clang-format @@ -32,9 +32,6 @@ IncludeCategories: # Project includes - Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$' Priority: 1 - # Third party library includes - - Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>' - Priority: 3 # Qt includes - Regex: '^$' Priority: 3 @@ -42,12 +39,12 @@ IncludeCategories: # LibCommuni includes - Regex: "^$" Priority: 3 - # Misc libraries - - Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$' - Priority: 3 # Standard library includes - Regex: "^<[a-zA-Z_]+>$" Priority: 4 + # Third party library includes + - Regex: "^<([a-zA-Z_0-9-]+/)*[a-zA-Z_0-9-]+.h(pp)?>$" + Priority: 3 NamespaceIndentation: Inner PointerBindsToType: false SpacesBeforeTrailingComments: 2 diff --git a/src/.clang-format b/src/.clang-format index 7bae09f2c..0feaad9dc 100644 --- a/src/.clang-format +++ b/src/.clang-format @@ -32,9 +32,6 @@ IncludeCategories: # Project includes - Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$' Priority: 1 - # Third party library includes - - Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>' - Priority: 3 # Qt includes - Regex: '^$' Priority: 3 @@ -42,12 +39,12 @@ IncludeCategories: # LibCommuni includes - Regex: "^$" Priority: 3 - # Misc libraries - - Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$' - Priority: 3 # Standard library includes - Regex: "^<[a-zA-Z_]+>$" Priority: 4 + # Third party library includes + - Regex: "^<([a-zA-Z_0-9-]+/)*[a-zA-Z_0-9-]+.h(pp)?>$" + Priority: 3 NamespaceIndentation: Inner PointerBindsToType: false SpacesBeforeTrailingComments: 2 diff --git a/src/common/ChatterinoSetting.hpp b/src/common/ChatterinoSetting.hpp index 6c9d8ec47..2f5a0cac4 100644 --- a/src/common/ChatterinoSetting.hpp +++ b/src/common/ChatterinoSetting.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/src/controllers/plugins/LuaUtilities.hpp b/src/controllers/plugins/LuaUtilities.hpp index 6a75b774a..f88f2a928 100644 --- a/src/controllers/plugins/LuaUtilities.hpp +++ b/src/controllers/plugins/LuaUtilities.hpp @@ -4,7 +4,7 @@ # include # include -# include +# include # include # include diff --git a/src/controllers/plugins/Plugin.cpp b/src/controllers/plugins/Plugin.cpp index 3fdc8e4dc..0e9a20d63 100644 --- a/src/controllers/plugins/Plugin.cpp +++ b/src/controllers/plugins/Plugin.cpp @@ -4,7 +4,7 @@ # include "controllers/commands/CommandController.hpp" # include -# include +# include # include # include diff --git a/src/providers/seventv/SeventvCosmetics.hpp b/src/providers/seventv/SeventvCosmetics.hpp index 0d521ac03..6302c51f4 100644 --- a/src/providers/seventv/SeventvCosmetics.hpp +++ b/src/providers/seventv/SeventvCosmetics.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include namespace chatterino::seventv { diff --git a/src/providers/seventv/eventapi/Message.hpp b/src/providers/seventv/eventapi/Message.hpp index 5dbc848b7..4227f6839 100644 --- a/src/providers/seventv/eventapi/Message.hpp +++ b/src/providers/seventv/eventapi/Message.hpp @@ -2,7 +2,7 @@ #include "providers/seventv/eventapi/Subscription.hpp" -#include +#include #include #include #include diff --git a/src/providers/seventv/eventapi/Subscription.hpp b/src/providers/seventv/eventapi/Subscription.hpp index 1a36811a5..65cf03544 100644 --- a/src/providers/seventv/eventapi/Subscription.hpp +++ b/src/providers/seventv/eventapi/Subscription.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/providers/twitch/api/Helix.cpp b/src/providers/twitch/api/Helix.cpp index 758efe9ff..8e4c73fc5 100644 --- a/src/providers/twitch/api/Helix.cpp +++ b/src/providers/twitch/api/Helix.cpp @@ -6,7 +6,7 @@ #include "common/QLogging.hpp" #include "util/CancellationToken.hpp" -#include +#include #include namespace { diff --git a/src/providers/twitch/pubsubmessages/AutoMod.hpp b/src/providers/twitch/pubsubmessages/AutoMod.hpp index 400169ac7..9f40d39da 100644 --- a/src/providers/twitch/pubsubmessages/AutoMod.hpp +++ b/src/providers/twitch/pubsubmessages/AutoMod.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/providers/twitch/pubsubmessages/Base.hpp b/src/providers/twitch/pubsubmessages/Base.hpp index ce190ee06..fed0112e7 100644 --- a/src/providers/twitch/pubsubmessages/Base.hpp +++ b/src/providers/twitch/pubsubmessages/Base.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/providers/twitch/pubsubmessages/ChannelPoints.hpp b/src/providers/twitch/pubsubmessages/ChannelPoints.hpp index c5a3ffe88..be8d1bd68 100644 --- a/src/providers/twitch/pubsubmessages/ChannelPoints.hpp +++ b/src/providers/twitch/pubsubmessages/ChannelPoints.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/src/providers/twitch/pubsubmessages/ChatModeratorAction.hpp b/src/providers/twitch/pubsubmessages/ChatModeratorAction.hpp index 5f29673e3..e04019cb7 100644 --- a/src/providers/twitch/pubsubmessages/ChatModeratorAction.hpp +++ b/src/providers/twitch/pubsubmessages/ChatModeratorAction.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include diff --git a/src/providers/twitch/pubsubmessages/Whisper.hpp b/src/providers/twitch/pubsubmessages/Whisper.hpp index ef96cd62b..979cb6a1e 100644 --- a/src/providers/twitch/pubsubmessages/Whisper.hpp +++ b/src/providers/twitch/pubsubmessages/Whisper.hpp @@ -1,6 +1,6 @@ #pragma once -#include +#include #include #include #include diff --git a/src/widgets/settingspages/GeneralPage.cpp b/src/widgets/settingspages/GeneralPage.cpp index d2b5c9908..338219976 100644 --- a/src/widgets/settingspages/GeneralPage.cpp +++ b/src/widgets/settingspages/GeneralPage.cpp @@ -21,7 +21,7 @@ #include "widgets/settingspages/GeneralPageView.hpp" #include "widgets/splits/SplitInput.hpp" -#include +#include #include #include #include diff --git a/tests/.clang-format b/tests/.clang-format index 7bae09f2c..0feaad9dc 100644 --- a/tests/.clang-format +++ b/tests/.clang-format @@ -32,9 +32,6 @@ IncludeCategories: # Project includes - Regex: '^"[a-zA-Z\._-]+(/[a-zA-Z0-9\._-]+)*"$' Priority: 1 - # Third party library includes - - Regex: '<[[:alnum:].]+/[a-zA-Z0-9\._\/-]+>' - Priority: 3 # Qt includes - Regex: '^$' Priority: 3 @@ -42,12 +39,12 @@ IncludeCategories: # LibCommuni includes - Regex: "^$" Priority: 3 - # Misc libraries - - Regex: '^<[a-zA-Z_0-9]+\.h(pp)?>$' - Priority: 3 # Standard library includes - Regex: "^<[a-zA-Z_]+>$" Priority: 4 + # Third party library includes + - Regex: "^<([a-zA-Z_0-9-]+/)*[a-zA-Z_0-9-]+.h(pp)?>$" + Priority: 3 NamespaceIndentation: Inner PointerBindsToType: false SpacesBeforeTrailingComments: 2