Skip to content

Commit

Permalink
Add missing loop
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 committed Nov 14, 2023
1 parent a770d28 commit 133dc41
Showing 1 changed file with 19 additions and 16 deletions.
35 changes: 19 additions & 16 deletions src/common/scripting/core/types.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2605,23 +2605,26 @@ static bool PMapValueReader(FSerializer &ar, M *map, const PMap *m)
const char * k;
if(m->KeyType == TypeName)
{
typename M::ValueType * val;
if constexpr(std::is_same_v<typename M::KeyType,uint32_t>)
{
val = &map->InsertNew(FName(k).GetIndex());
}
else
{
#ifdef __GNUC__
__builtin_unreachable();
#elif defined(_MSC_VER)
__assume(0);
#endif
}
if (!m->ValueType->ReadValue(ar,nullptr,static_cast<void*>(val)))
while((k = ar.GetKey()))
{
ar.EndObject();
return false;
typename M::ValueType * val;
if constexpr(std::is_same_v<typename M::KeyType,uint32_t>)
{
val = &map->InsertNew(FName(k).GetIndex());
}
else
{
#ifdef __GNUC__
__builtin_unreachable();
#elif defined(_MSC_VER)
__assume(0);
#endif
}
if (!m->ValueType->ReadValue(ar,nullptr,static_cast<void*>(val)))
{
ar.EndObject();
return false;
}
}
}
else
Expand Down

0 comments on commit 133dc41

Please sign in to comment.