Skip to content

Commit

Permalink
Update magic_enum from v0.9.3 to v0.9.5 (#4992)
Browse files Browse the repository at this point in the history
* Fix include path for magic enum
* Update .clang-format to ensure magic enum is caught as a third party library
  • Loading branch information
pajlada authored Dec 1, 2023
1 parent 6d02bb7 commit e327ed4
Show file tree
Hide file tree
Showing 20 changed files with 28 additions and 39 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
9 changes: 3 additions & 6 deletions benchmarks/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,19 @@ 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: '^<Q[a-zA-Z0-9\._\/-]+>$'
Priority: 3
CaseSensitive: true
# LibCommuni includes
- Regex: "^<Irc[a-zA-Z]+>$"
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
Expand Down
2 changes: 1 addition & 1 deletion cmake/FindMagicEnum.cmake
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
2 changes: 1 addition & 1 deletion lib/magic_enum
Submodule magic_enum updated 54 files
+5 −0 .bazelignore
+10 −0 .bazelrc
+1 −0 .bazelversion
+19 −0 .github/workflows/bzlmod-archive.yml
+11 −5 .github/workflows/macos.yml
+32 −31 .github/workflows/ubuntu.yml
+12 −7 .github/workflows/windows.yml
+1 −0 .gitignore
+2 −54 BUILD.bazel
+90 −23 CMakeLists.txt
+1 −1 LICENSE
+5 −0 MODULE.bazel
+109 −41 README.md
+13 −0 SECURITY.md
+0 −0 WORKSPACE.bazel
+239 −0 cmake/GenPkgConfig/GenPkgConfig.cmake
+45 −0 cmake/GenPkgConfig/ReadMe.md
+24 −0 cmake/GenPkgConfig/UNLICENSE
+18 −0 cmake/GenPkgConfig/buildTimeScripts/getObjectFilesBaseNames.cmake
+1 −1 doc/limitations.md
+421 −19 doc/reference.md
+4 −1 example/CMakeLists.txt
+9 −8 example/enum_flag_example.cpp
+9 −2 example/example.cpp
+65 −0 example/example_containers_array.cpp
+56 −0 example/example_containers_bitset.cpp
+56 −0 example/example_containers_set.cpp
+1 −1 example/example_custom_name.cpp
+2 −2 example/example_nonascii_name.cpp
+5 −4 example/example_switch.cpp
+477 −536 include/magic_enum/magic_enum.hpp
+44 −0 include/magic_enum/magic_enum_all.hpp
+1,170 −0 include/magic_enum/magic_enum_containers.hpp
+203 −0 include/magic_enum/magic_enum_flags.hpp
+48 −14 include/magic_enum/magic_enum_format.hpp
+24 −15 include/magic_enum/magic_enum_fuse.hpp
+115 −0 include/magic_enum/magic_enum_iostream.hpp
+35 −34 include/magic_enum/magic_enum_switch.hpp
+137 −0 include/magic_enum/magic_enum_utility.hpp
+14 −3 meson.build
+13 −0 meson_options.txt
+1 −1 package.xml
+2 −0 test/.bazelrc
+25 −0 test/BUILD.bazel
+21 −4 test/CMakeLists.txt
+6 −0 test/MODULE.bazel
+0 −0 test/WORKSPACE.bazel
+17 −0 test/meson.build
+283 −233 test/test.cpp
+3 −1 test/test_aliases.cpp
+318 −0 test/test_containers.cpp
+130 −179 test/test_flags.cpp
+445 −0 test/test_nonascii.cpp
+147 −0 test/test_wchar_t.cpp
9 changes: 3 additions & 6 deletions mocks/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,19 @@ 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: '^<Q[a-zA-Z0-9\._\/-]+>$'
Priority: 3
CaseSensitive: true
# LibCommuni includes
- Regex: "^<Irc[a-zA-Z]+>$"
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
Expand Down
9 changes: 3 additions & 6 deletions src/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,19 @@ 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: '^<Q[a-zA-Z0-9\._\/-]+>$'
Priority: 3
CaseSensitive: true
# LibCommuni includes
- Regex: "^<Irc[a-zA-Z]+>$"
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
Expand Down
2 changes: 1 addition & 1 deletion src/common/ChatterinoSetting.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <pajlada/settings.hpp>
#include <QString>

Expand Down
2 changes: 1 addition & 1 deletion src/controllers/plugins/LuaUtilities.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

# include <lua.h>
# include <lualib.h>
# include <magic_enum.hpp>
# include <magic_enum/magic_enum.hpp>
# include <QList>

# include <string>
Expand Down
2 changes: 1 addition & 1 deletion src/controllers/plugins/Plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# include "controllers/commands/CommandController.hpp"

# include <lua.h>
# include <magic_enum.hpp>
# include <magic_enum/magic_enum.hpp>
# include <QJsonArray>
# include <QJsonObject>

Expand Down
2 changes: 1 addition & 1 deletion src/providers/seventv/SeventvCosmetics.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>

namespace chatterino::seventv {

Expand Down
2 changes: 1 addition & 1 deletion src/providers/seventv/eventapi/Message.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "providers/seventv/eventapi/Subscription.hpp"

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <QJsonDocument>
#include <QJsonObject>
#include <QString>
Expand Down
2 changes: 1 addition & 1 deletion src/providers/seventv/eventapi/Subscription.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <QByteArray>
#include <QHash>
#include <QJsonObject>
Expand Down
2 changes: 1 addition & 1 deletion src/providers/twitch/api/Helix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "common/QLogging.hpp"
#include "util/CancellationToken.hpp"

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <QJsonDocument>

namespace {
Expand Down
2 changes: 1 addition & 1 deletion src/providers/twitch/pubsubmessages/AutoMod.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <QColor>
#include <QJsonObject>
#include <QString>
Expand Down
2 changes: 1 addition & 1 deletion src/providers/twitch/pubsubmessages/Base.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <QJsonDocument>
#include <QJsonObject>
#include <QString>
Expand Down
2 changes: 1 addition & 1 deletion src/providers/twitch/pubsubmessages/ChannelPoints.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <QJsonObject>
#include <QString>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <QJsonObject>
#include <QString>

Expand Down
2 changes: 1 addition & 1 deletion src/providers/twitch/pubsubmessages/Whisper.hpp
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#pragma once

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <QColor>
#include <QJsonObject>
#include <QString>
Expand Down
2 changes: 1 addition & 1 deletion src/widgets/settingspages/GeneralPage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include "widgets/settingspages/GeneralPageView.hpp"
#include "widgets/splits/SplitInput.hpp"

#include <magic_enum.hpp>
#include <magic_enum/magic_enum.hpp>
#include <QDesktopServices>
#include <QFileDialog>
#include <QFontDialog>
Expand Down
9 changes: 3 additions & 6 deletions tests/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -32,22 +32,19 @@ 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: '^<Q[a-zA-Z0-9\._\/-]+>$'
Priority: 3
CaseSensitive: true
# LibCommuni includes
- Regex: "^<Irc[a-zA-Z]+>$"
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
Expand Down

0 comments on commit e327ed4

Please sign in to comment.