Skip to content

Commit 81b2d23

Browse files
RTTI2 fix compilation errors
amend to retrigger CI
1 parent 5098ee7 commit 81b2d23

File tree

3 files changed

+11
-11
lines changed

3 files changed

+11
-11
lines changed

PolyEngine/Core/Src/pe/core/rtti/RTTI2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ namespace pe::core::rtti
44
{
55
namespace RTTI2
66
{
7-
TypeManager& get()
7+
TypeManager& TypeManager::get()
88
{
99
static TypeManager instance{};
1010
return instance;
1111
}
1212
}
13-
}
13+
}

PolyEngine/Core/Src/pe/core/rtti/RTTI2.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,19 @@ namespace pe::core::rtti
1717

1818
namespace impl
1919
{
20+
template <typename F, typename X>
21+
void runListImpl(F f, X x) { f(x); }
22+
2023
template <typename F, typename X, typename ... XS>
21-
void runList(F f, X x, XS... xs)
24+
void runListImpl(F f, X x, XS... xs)
2225
{
2326
f(x);
24-
runList(f, xs...);
27+
runListImpl(f, xs...);
2528
}
26-
27-
template <typename F, typename X>
28-
void runList(F f, X x) { f(x); }
2929
}
3030

3131
constexpr auto runList = [](auto list, auto f) {
32-
list([f](auto... xs){ impl::runList(f, xs...); });
32+
list([f](auto... xs){ impl::runListImpl(f, xs...); });
3333
};
3434

3535
namespace RTTI2

PolyEngine/UnitTests/Src/RTTI2Test.cpp renamed to PolyEngine/Tests/CoreTests/Src/RTTI2Test.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ struct TestClass : public virtual RTTI2::RTTIBase {
1010
TestClass() : RTTI2::RTTIBase(RTTI2::TypeManager::get().registerOrGetType<TestClass>()) {}
1111
};
1212
template <> struct RTTI2::RTTIinfo<TestClass> {
13-
constexpr static auto info = List(testAttr, testAttr, RTTI2::classname{ "testname" });
13+
constexpr static auto info = List(testAttr, testAttr, RTTI2::ClassName{ "testname" });
1414
};
1515

1616
TEST_CASE("RTTI2 simple attribute", "[RTTI2]") {
@@ -20,7 +20,7 @@ TEST_CASE("RTTI2 simple attribute", "[RTTI2]") {
2020
CHECK(ta);
2121
CHECK(ta->size() == 2);
2222
CHECK(tc.typeInfo().get<int>() == nullptr);
23-
auto x = tc.typeInfo().get<RTTI2::classname>();
23+
auto x = tc.typeInfo().get<RTTI2::ClassName>();
2424
CHECK(x);
2525
CHECK(std::string("testname") == x->name);
2626
}
@@ -73,4 +73,4 @@ TEST_CASE("RTTI2 derived", "[RTTI2]") {
7373
CHECK(tcb.typeInfo().bases[0].get().id == tca.typeInfo().id);
7474
CHECK(RTTI2::isSame<TestClassA>(tca.typeInfo()));
7575
CHECK(RTTI2::isDerived<TestClassA>(tcb.typeInfo()));
76-
}
76+
}

0 commit comments

Comments
 (0)