From 34c58bc9660cd60ff2f71d6a92c4fd53e960df9f Mon Sep 17 00:00:00 2001 From: mateuszb Date: Mon, 2 Aug 2010 11:06:49 +0000 Subject: [PATCH] * fixed some warnings --- client/GUIClasses.cpp | 4 ++++ server/CGameHandler.cpp | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/client/GUIClasses.cpp b/client/GUIClasses.cpp index bb676f82a..7e0917898 100644 --- a/client/GUIClasses.cpp +++ b/client/GUIClasses.cpp @@ -2910,6 +2910,8 @@ std::string CTradeWindow::CTradeableItem::getName(int number /*= -1*/) const case ARTIFACT: return CGI->arth->artifacts[id]->Name(); } + assert(0); + return ""; } CTradeWindow::CTradeWindow(const IMarket *Market, const CGHeroInstance *Hero, EMarketMode Mode) @@ -6259,6 +6261,8 @@ std::string CHillFortWindow::getDefForSlot(int slot) case 1: return "APHLF1Y.DEF"; case 2: return "APHLF1G.DEF"; } + assert(0); + return ""; } std::string CHillFortWindow::getTextForSlot(int slot) diff --git a/server/CGameHandler.cpp b/server/CGameHandler.cpp index e59cdfff1..395d233e2 100644 --- a/server/CGameHandler.cpp +++ b/server/CGameHandler.cpp @@ -3242,6 +3242,7 @@ bool CGameHandler::buyArtifact(const IMarket *m, const CGHeroInstance *h, int ri sendAndApply(&saa); giveHeroArtifact(aid, h->id, -2); + return true; } bool CGameHandler::buySecSkill( const IMarket *m, const CGHeroInstance *h, int skill) @@ -3270,7 +3271,8 @@ bool CGameHandler::buySecSkill( const IMarket *m, const CGHeroInstance *h, int s sr.val = getResource(h->tempOwner, 6) - 2000; sendAndApply(&sr); - changeSecSkill(h->id, skill, 1, true); + changeSecSkill(h->id, skill, 1, true); + return true; } bool CGameHandler::tradeResources(const IMarket *market, ui32 val, ui8 player, ui32 id1, ui32 id2)