1
0
mirror of synced 2024-09-25 12:08:26 +02:00

fix: Let's not cause UB on every event call...

This commit is contained in:
WerWolv 2022-04-15 19:02:36 +02:00
parent 457d338a97
commit f5fe49923b

View File

@ -87,7 +87,7 @@ namespace hex {
static void post(auto &&...args) noexcept {
for (const auto &[id, event] : s_events) {
if (id == E::id)
(*reinterpret_cast<E *>(event))(std::forward<decltype(args)>(args)...);
(*static_cast<E *const>(event))(std::forward<decltype(args)>(args)...);
}
}