From ce6940e272c995358c1f5d940ee4c27205b211ed Mon Sep 17 00:00:00 2001 From: Haryaalcar Date: Thu, 26 Jun 2014 01:23:12 +0300 Subject: [PATCH 1/2] build fix for mac os: 1) type_info visibility for CatapultAttack 2) using IObjectInfo::CArmyStructure in min_element : operator< should be const --- lib/NetPacks.h | 2 +- lib/mapObjects/CObjectClassesHandler.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/NetPacks.h b/lib/NetPacks.h index f82189e48..2d7f30e15 100644 --- a/lib/NetPacks.h +++ b/lib/NetPacks.h @@ -1516,7 +1516,7 @@ struct ObstaclesRemoved : public CPackForClient //3014 }; //FIXME: figure out why gcc fails to find type_info for this class with -fvisibility=hidden flag set -#ifdef __linux__ +#if defined(__linux__) || defined(__APPLE__) struct DLL_LINKAGE CatapultAttack : public CPackForClient //3015 #else struct CatapultAttack : public CPackForClient //3015 diff --git a/lib/mapObjects/CObjectClassesHandler.h b/lib/mapObjects/CObjectClassesHandler.h index 403b18830..3d5886901 100644 --- a/lib/mapObjects/CObjectClassesHandler.h +++ b/lib/mapObjects/CObjectClassesHandler.h @@ -65,7 +65,7 @@ public: walkersStrength(0) {} - bool operator <(const CArmyStructure & other) + bool operator <(const CArmyStructure & other) const { return this->totalStrength < other.totalStrength; } From 88122ee253f26e6e8d384032a12eec090759761c Mon Sep 17 00:00:00 2001 From: Haryaalcar Date: Thu, 26 Jun 2014 02:18:59 +0300 Subject: [PATCH 2/2] another build fix: Undefined symbols for architecture x86_64: "operator<<(std::__1::basic_ostream >&, EVictoryLossCheckResult const&) --- AI/VCAI/VCAI.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/AI/VCAI/VCAI.cpp b/AI/VCAI/VCAI.cpp index c18d5ca18..fbf9f1831 100644 --- a/AI/VCAI/VCAI.cpp +++ b/AI/VCAI/VCAI.cpp @@ -196,7 +196,7 @@ void VCAI::showShipyardDialog(const IShipyard *obj) void VCAI::gameOver(PlayerColor player, const EVictoryLossCheckResult & victoryLossCheckResult) { - LOG_TRACE_PARAMS(logAi, "victoryLossCheckResult '%s'", victoryLossCheckResult); + LOG_TRACE_PARAMS(logAi, "victoryLossCheckResult '%s'", victoryLossCheckResult.messageToSelf); NET_EVENT_HANDLER; logAi->debugStream() << boost::format("Player %d: I heard that player %d %s.") % playerID % player.getNum() % (victoryLossCheckResult.victory() ? "won" : "lost"); if(player == playerID)