diff --git a/src/g_game.cpp b/src/g_game.cpp index 5d1f83b82..629202ea5 100644 --- a/src/g_game.cpp +++ b/src/g_game.cpp @@ -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(crc32(0, &(*picdata)[0], picdata->Size())), (char*)&(*picdata)[0] }; savegame_content.Push(bufpng); savegame_filenames.Push("savepic.png"); diff --git a/src/serializer.cpp b/src/serializer.cpp index ae1c55a7a..a23459ced 100644 --- a/src/serializer.cpp +++ b/src/serializer.cpp @@ -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. diff --git a/src/serializer.h b/src/serializer.h index f1d35e1f8..a3e1f531e 100644 --- a/src/serializer.h +++ b/src/serializer.h @@ -163,7 +163,7 @@ public: template FSerializer &Enum(const char *key, T &obj) { - auto val = (std::underlying_type::type)obj; + auto val = (typename std::underlying_type::type)obj; Serialize(*this, key, val, nullptr); obj = (T)val; return *this; @@ -299,4 +299,4 @@ FSerializer &Serialize(FSerializer &arc, const char *key, TFlags &flags, } -#endif \ No newline at end of file +#endif