mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-25 05:21:16 +00:00
Add missing loop
This commit is contained in:
parent
747e55ce60
commit
3056786f38
1 changed files with 19 additions and 16 deletions
|
@ -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>)
|
||||
while((k = ar.GetKey()))
|
||||
{
|
||||
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;
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue