Permalink
Browse files

Fix Variant CArchive for altName

  • Loading branch information...
jolting committed May 2, 2018
1 parent c16e6d9 commit ad3a9d8aed635a442eb239c036d4b7e9867c3c0c
Showing with 2 additions and 2 deletions.
  1. +2 −2 libs/serialization/include/mrpt/serialization/CArchive.h
@@ -235,14 +235,14 @@ class CArchive
template <typename T, typename T2, typename ... REST>
const mrpt::rtti::TRuntimeClassId* findRegisteredClassInList(std::string_view strClassName)
{
return T::GetRuntimeClassIdStatic().className == strClassName || T::GetRuntimeClassIdStatic().altName ?
return T::GetRuntimeClassIdStatic().className == strClassName || T::GetRuntimeClassIdStatic().altName == strClassName ?
&T::GetRuntimeClassIdStatic() : findRegisteredClassInList<T2, REST...>(strClassName);
}
template <typename T>
const mrpt::rtti::TRuntimeClassId* findRegisteredClassInList(std::string_view strClassName)
{
return T::GetRuntimeClassIdStatic().className == strClassName || T::GetRuntimeClassIdStatic().altName ?
return T::GetRuntimeClassIdStatic().className == strClassName || T::GetRuntimeClassIdStatic().altName == strClassName ?
&T::GetRuntimeClassIdStatic() : nullptr;
}

0 comments on commit ad3a9d8

Please sign in to comment.