1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-01-12 02:28:11 +02:00

fix mingw build

This commit is contained in:
AlexVinS 2014-06-26 20:41:27 +04:00
parent 00b6232ff6
commit c28b5f6633
3 changed files with 28 additions and 20 deletions

View File

@ -2130,16 +2130,8 @@ struct ELF_VISIBILITY SelectMap : public CPregamePackToPropagate
const CMapInfo *mapInfo; const CMapInfo *mapInfo;
bool free; bool free;
SelectMap(const CMapInfo &src) DLL_LINKAGE SelectMap(const CMapInfo &src);
{ DLL_LINKAGE SelectMap();
mapInfo = &src;
free = false;
}
SelectMap()
{
mapInfo = nullptr;
free = true;
}
DLL_LINKAGE ~SelectMap(); DLL_LINKAGE ~SelectMap();
void apply(CSelectionScreen *selScreen); //that functions are implemented in CPreGame.cpp 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 void apply(CSelectionScreen *selScreen); //that functions are implemented in CPreGame.cpp
UpdateStartOptions(StartInfo &src) DLL_LINKAGE UpdateStartOptions(StartInfo &src);
{ DLL_LINKAGE UpdateStartOptions();
options = &src;
free = false;
}
UpdateStartOptions()
{
options = nullptr;
free = true;
}
DLL_LINKAGE ~UpdateStartOptions(); DLL_LINKAGE ~UpdateStartOptions();
template <typename Handler> void serialize(Handler &h, const int version) template <typename Handler> void serialize(Handler &h, const int version)

View File

@ -62,12 +62,35 @@ DLL_LINKAGE void SetSecSkill::applyGs( CGameState *gs )
hero->setSecSkillLevel(which, val, abs); 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() DLL_LINKAGE SelectMap::~SelectMap()
{ {
if(free) if(free)
delete mapInfo; delete mapInfo;
} }
DLL_LINKAGE UpdateStartOptions::UpdateStartOptions(StartInfo &src)
{
options = &src;
free = false;
}
DLL_LINKAGE UpdateStartOptions::UpdateStartOptions()
{
options = nullptr;
free = true;
}
DLL_LINKAGE UpdateStartOptions::~UpdateStartOptions() DLL_LINKAGE UpdateStartOptions::~UpdateStartOptions()
{ {
if(free) if(free)

View File

@ -128,6 +128,7 @@
<Unit filename="IGameCallback.cpp" /> <Unit filename="IGameCallback.cpp" />
<Unit filename="IGameCallback.h" /> <Unit filename="IGameCallback.h" />
<Unit filename="IGameEventsReceiver.h" /> <Unit filename="IGameEventsReceiver.h" />
<Unit filename="IHandlerBase.cpp" />
<Unit filename="IHandlerBase.h" /> <Unit filename="IHandlerBase.h" />
<Unit filename="Interprocess.h" /> <Unit filename="Interprocess.h" />
<Unit filename="JsonDetail.cpp" /> <Unit filename="JsonDetail.cpp" />