mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-23 22:37:55 +02:00
Refactoring of serialization versioning handling
- Removed 'version' field from serialize() method - Handler classes - Binary(De)Serializer now have 'version' field - Serialization versioning now uses named enum Save compatibility with 1.4.X saves should be intact
This commit is contained in:
@@ -161,7 +161,7 @@ CMapOverviewWidget::CMapOverviewWidget(CMapOverview& parent):
|
||||
std::unique_ptr<CMap> campaignMap = nullptr;
|
||||
if(p.tabType != ESelectionScreen::newGame && config["variables"]["mapPreviewForSaves"].Bool())
|
||||
{
|
||||
CLoadFile lf(*CResourceHandler::get()->getResourceName(ResourcePath(p.resource.getName(), EResType::SAVEGAME)), MINIMAL_SERIALIZATION_VERSION);
|
||||
CLoadFile lf(*CResourceHandler::get()->getResourceName(ResourcePath(p.resource.getName(), EResType::SAVEGAME)), ESerializationVersion::MINIMAL);
|
||||
lf.checkMagicBytes(SAVEGAME_MAGIC);
|
||||
|
||||
auto mapHeader = std::make_unique<CMapHeader>();
|
||||
|
||||
Reference in New Issue
Block a user