From f5fe49923b3ee6bfec3e566bf009247ab84aec7f Mon Sep 17 00:00:00 2001 From: WerWolv Date: Fri, 15 Apr 2022 19:02:36 +0200 Subject: [PATCH] fix: Let's not cause UB on every event call... --- lib/libimhex/include/hex/api/event.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/libimhex/include/hex/api/event.hpp b/lib/libimhex/include/hex/api/event.hpp index be323ee7c..6108c9357 100644 --- a/lib/libimhex/include/hex/api/event.hpp +++ b/lib/libimhex/include/hex/api/event.hpp @@ -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(event))(std::forward(args)...); + (*static_cast(event))(std::forward(args)...); } }