From c28b5f6633fe1930e85bf3b499328e2bdd6d086c Mon Sep 17 00:00:00 2001 From: AlexVinS Date: Thu, 26 Jun 2014 20:41:27 +0400 Subject: [PATCH] fix mingw build --- lib/NetPacks.h | 24 ++++-------------------- lib/NetPacksLib.cpp | 23 +++++++++++++++++++++++ lib/VCMI_lib.cbp | 1 + 3 files changed, 28 insertions(+), 20 deletions(-) diff --git a/lib/NetPacks.h b/lib/NetPacks.h index 14234899d..155f487bf 100644 --- a/lib/NetPacks.h +++ b/lib/NetPacks.h @@ -2130,16 +2130,8 @@ struct ELF_VISIBILITY SelectMap : public CPregamePackToPropagate const CMapInfo *mapInfo; bool free; - SelectMap(const CMapInfo &src) - { - mapInfo = &src; - free = false; - } - SelectMap() - { - mapInfo = nullptr; - free = true; - } + DLL_LINKAGE SelectMap(const CMapInfo &src); + DLL_LINKAGE SelectMap(); DLL_LINKAGE ~SelectMap(); void apply(CSelectionScreen *selScreen); //that functions are implemented in CPreGame.cpp @@ -2158,16 +2150,8 @@ struct ELF_VISIBILITY UpdateStartOptions : public CPregamePackToPropagate void apply(CSelectionScreen *selScreen); //that functions are implemented in CPreGame.cpp - UpdateStartOptions(StartInfo &src) - { - options = &src; - free = false; - } - UpdateStartOptions() - { - options = nullptr; - free = true; - } + DLL_LINKAGE UpdateStartOptions(StartInfo &src); + DLL_LINKAGE UpdateStartOptions(); DLL_LINKAGE ~UpdateStartOptions(); template void serialize(Handler &h, const int version) diff --git a/lib/NetPacksLib.cpp b/lib/NetPacksLib.cpp index 7504af7db..2c700b101 100644 --- a/lib/NetPacksLib.cpp +++ b/lib/NetPacksLib.cpp @@ -62,12 +62,35 @@ DLL_LINKAGE void SetSecSkill::applyGs( CGameState *gs ) hero->setSecSkillLevel(which, val, abs); } + +DLL_LINKAGE SelectMap::SelectMap(const CMapInfo &src) +{ + mapInfo = &src; + free = false; +} +DLL_LINKAGE SelectMap::SelectMap() +{ + mapInfo = nullptr; + free = true; +} + DLL_LINKAGE SelectMap::~SelectMap() { if(free) delete mapInfo; } +DLL_LINKAGE UpdateStartOptions::UpdateStartOptions(StartInfo &src) +{ + options = &src; + free = false; +} +DLL_LINKAGE UpdateStartOptions::UpdateStartOptions() +{ + options = nullptr; + free = true; +} + DLL_LINKAGE UpdateStartOptions::~UpdateStartOptions() { if(free) diff --git a/lib/VCMI_lib.cbp b/lib/VCMI_lib.cbp index aaff61c72..a1cdd70e0 100644 --- a/lib/VCMI_lib.cbp +++ b/lib/VCMI_lib.cbp @@ -128,6 +128,7 @@ +