1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix save compatiblity with 1.4

This commit is contained in:
Ivan Savenko
2024-02-11 17:31:30 +02:00
parent 38ba42ef7a
commit 7790acae3a

View File

@@ -264,7 +264,12 @@ public:
h & width;
h & height;
h & twoLevel;
h & difficulty;
// FIXME: we should serialize enum's according to their underlying type
// should be fixed when we are making breaking change to save compatiblity
static_assert(Handler::Version::MINIMAL < Handler::Version::RELEASE_143);
uint8_t difficultyInteger = static_cast<uint8_t>(difficulty);
h & difficultyInteger;
difficulty = static_cast<EMapDifficulty>(difficultyInteger);
h & levelLimit;
h & areAnyPlayers;
h & players;