From e872b400b7ce5ec4778225a3a8e8fbd2ce4b8745 Mon Sep 17 00:00:00 2001 From: ArseniyShestakov Date: Sun, 6 Dec 2015 02:51:54 +0300 Subject: [PATCH] Comments save format backward compatability code as Ivan suggested Also we should always handle RumorState::TYPE_NONE in getTavernRumor properly anyway. --- lib/CGameInfoCallback.cpp | 2 +- lib/CGameState.h | 2 +- lib/mapObjects/CGHeroInstance.h | 2 +- lib/spells/CSpellHandler.h | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/CGameInfoCallback.cpp b/lib/CGameInfoCallback.cpp index 249b6fe8b..66080b7aa 100644 --- a/lib/CGameInfoCallback.cpp +++ b/lib/CGameInfoCallback.cpp @@ -577,7 +577,7 @@ EPlayerStatus::EStatus CGameInfoCallback::getPlayerStatus(PlayerColor player, bo std::string CGameInfoCallback::getTavernRumor(const CGObjectInstance * townOrTavern) const { std::string text = "", extraText = ""; - if(gs->rumor.type == RumorState::TYPE_NONE) // (version < 755 backward compatability + if(gs->rumor.type == RumorState::TYPE_NONE) return text; auto rumor = gs->rumor.last[gs->rumor.type]; diff --git a/lib/CGameState.h b/lib/CGameState.h index b91f4e106..e7ddb89ee 100644 --- a/lib/CGameState.h +++ b/lib/CGameState.h @@ -249,7 +249,7 @@ public: template void serialize(Handler &h, const int version) { h & scenarioOps & initialOpts & currentPlayer & day & map & players & teams & hpool & globalEffects & rand; - if(version >= 755) + if(version >= 755) //save format backward compatibility { h & rumor; } diff --git a/lib/mapObjects/CGHeroInstance.h b/lib/mapObjects/CGHeroInstance.h index 16d0ae633..a6cc59cb1 100644 --- a/lib/mapObjects/CGHeroInstance.h +++ b/lib/mapObjects/CGHeroInstance.h @@ -79,7 +79,7 @@ public: template void serialize(Handler &h, const int version) { h & patrolling; - if(version >= 755) + if(version >= 755) //save format backward compatibility { h & initialPos; } diff --git a/lib/spells/CSpellHandler.h b/lib/spells/CSpellHandler.h index 332b7396e..71c36ddcc 100644 --- a/lib/spells/CSpellHandler.h +++ b/lib/spells/CSpellHandler.h @@ -75,7 +75,7 @@ public: template void serialize(Handler & h, const int version) { h & resourceName & verticalPosition; - if(version >= 754) + if(version >= 754) //save format backward compatibility { h & pause; }