diff --git a/libsrc/core/register_archive.hpp b/libsrc/core/register_archive.hpp index 80f46fc0..7fbc4c87 100644 --- a/libsrc/core/register_archive.hpp +++ b/libsrc/core/register_archive.hpp @@ -63,11 +63,11 @@ namespace ngcore { return typeid(T) == ti ? nT : Archive::Caster::tryUpcast(ti, nT); }; - info.upcaster = [/*this*/](const std::type_info& ti, void* p) -> void* + info.upcaster = [](const std::type_info& ti, void* p) -> void* { return typeid(T) == ti ? p : Archive::Caster::tryUpcast(ti, static_cast(p)); }; - info.downcaster = [/*this*/](const std::type_info& ti, void* p) -> void* + info.downcaster = [](const std::type_info& ti, void* p) -> void* { return typeid(T) == ti ? p : Archive::Caster::tryDowncast(ti, p); }; - info.cargs_archiver = [this](Archive &ar, void* p) { + info.cargs_archiver = [](Archive &ar, void* p) { if constexpr(detail::has_GetCArgs_v) ar << static_cast(p)->GetCArgs(); };