mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-26 14:01:45 +00:00
- Fixed GCC/Clang regression post serialization.
This commit is contained in:
parent
b7c822d208
commit
7e4d0ecdbf
3 changed files with 5 additions and 5 deletions
|
@ -1884,7 +1884,7 @@ void G_DoLoadGame ()
|
|||
}
|
||||
else
|
||||
{
|
||||
Printf("Savegame is from another ZDoom-based engine: %s\n", engine);
|
||||
Printf("Savegame is from another ZDoom-based engine: %s\n", engine.GetChars());
|
||||
}
|
||||
delete resfile;
|
||||
return;
|
||||
|
@ -2261,7 +2261,7 @@ void G_DoSaveGame (bool okForQuicksave, FString filename, const char *descriptio
|
|||
}
|
||||
|
||||
auto picdata = savepic.GetBuffer();
|
||||
FCompressedBuffer bufpng = { picdata->Size(), picdata->Size(), METHOD_STORED, 0, crc32(0, &(*picdata)[0], picdata->Size()), (char*)&(*picdata)[0] };
|
||||
FCompressedBuffer bufpng = { picdata->Size(), picdata->Size(), METHOD_STORED, 0, static_cast<unsigned int>(crc32(0, &(*picdata)[0], picdata->Size())), (char*)&(*picdata)[0] };
|
||||
|
||||
savegame_content.Push(bufpng);
|
||||
savegame_filenames.Push("savepic.png");
|
||||
|
|
|
@ -859,7 +859,7 @@ void FSerializer::ReadObjects(bool hubtravel)
|
|||
PClass *cls = PClass::FindClass(clsname);
|
||||
if (cls == nullptr)
|
||||
{
|
||||
Printf("Unknown object class '%d' in savegame", clsname.GetChars());
|
||||
Printf("Unknown object class '%s' in savegame", clsname.GetChars());
|
||||
founderrors = true;
|
||||
r->mDObjects[i] = RUNTIME_CLASS(AActor)->CreateNew(); // make sure we got at least a valid pointer for the duration of the loading process.
|
||||
r->mDObjects[i]->Destroy(); // but we do not want to keep this around, so destroy it right away.
|
||||
|
|
|
@ -163,7 +163,7 @@ public:
|
|||
template<class T>
|
||||
FSerializer &Enum(const char *key, T &obj)
|
||||
{
|
||||
auto val = (std::underlying_type<T>::type)obj;
|
||||
auto val = (typename std::underlying_type<T>::type)obj;
|
||||
Serialize(*this, key, val, nullptr);
|
||||
obj = (T)val;
|
||||
return *this;
|
||||
|
@ -299,4 +299,4 @@ FSerializer &Serialize(FSerializer &arc, const char *key, TFlags<T, TT> &flags,
|
|||
}
|
||||
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue