Skip to content

Commit

Permalink
meta: suppress (wrong) warnings by g++
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Sep 30, 2024
1 parent 805cbf9 commit db22dd8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions test/entt/meta/meta_data.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -224,8 +224,8 @@ TEST_F(MetaData, Custom) {
ENTT_DEBUG_TEST_F(MetaDataDeathTest, Custom) {
using namespace entt::literals;

ASSERT_DEATH([[maybe_unused]] const int &value = entt::resolve<clazz>().data("i"_hs).custom(), "");
ASSERT_DEATH([[maybe_unused]] const char &value = entt::resolve<clazz>().data("j"_hs).custom(), "");
ASSERT_DEATH([[maybe_unused]] int value = entt::resolve<clazz>().data("i"_hs).custom(), "");
ASSERT_DEATH([[maybe_unused]] char value = entt::resolve<clazz>().data("j"_hs).custom(), "");
}

TEST_F(MetaData, Const) {
Expand Down
4 changes: 2 additions & 2 deletions test/entt/meta/meta_func.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,8 +241,8 @@ TEST_F(MetaFunc, Custom) {
ENTT_DEBUG_TEST_F(MetaFuncDeathTest, Custom) {
using namespace entt::literals;

ASSERT_DEATH([[maybe_unused]] const int &value = entt::resolve<function>().func("g"_hs).custom(), "");
ASSERT_DEATH([[maybe_unused]] const char &value = entt::resolve<function>().func("h"_hs).custom(), "");
ASSERT_DEATH([[maybe_unused]] int value = entt::resolve<function>().func("g"_hs).custom(), "");
ASSERT_DEATH([[maybe_unused]] char value = entt::resolve<function>().func("h"_hs).custom(), "");
}

TEST_F(MetaFunc, Const) {
Expand Down
4 changes: 2 additions & 2 deletions test/entt/meta/meta_type.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,8 @@ TEST_F(MetaType, Custom) {
}

ENTT_DEBUG_TEST_F(MetaTypeDeathTest, Custom) {
ASSERT_DEATH([[maybe_unused]] const int &value = entt::resolve<clazz>().custom(), "");
ASSERT_DEATH([[maybe_unused]] const char &value = entt::resolve<base>().custom(), "");
ASSERT_DEATH([[maybe_unused]] int value = entt::resolve<clazz>().custom(), "");
ASSERT_DEATH([[maybe_unused]] char value = entt::resolve<base>().custom(), "");
}

TEST_F(MetaType, RemovePointer) {
Expand Down

0 comments on commit db22dd8

Please sign in to comment.