mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-24 22:14:36 +02:00
Possibly fixed compiling on gcc.
This commit is contained in:
parent
82f4c09687
commit
f33d3894bd
@ -22,7 +22,7 @@
|
|||||||
#include <boost/thread.hpp>
|
#include <boost/thread.hpp>
|
||||||
#include <boost/thread/shared_mutex.hpp>
|
#include <boost/thread/shared_mutex.hpp>
|
||||||
|
|
||||||
#include "lib/RegisterTypes.h"
|
#include "lib/RegisterTypes.cpp"
|
||||||
boost::rand48 ran;
|
boost::rand48 ran;
|
||||||
|
|
||||||
|
|
||||||
@ -33,6 +33,18 @@ boost::rand48 ran;
|
|||||||
#undef max
|
#undef max
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
void foofoofoo()
|
||||||
|
{
|
||||||
|
//never called function to force instantation of templates
|
||||||
|
int *ccc = NULL;
|
||||||
|
registerTypes((CISer<CConnection>&)*ccc);
|
||||||
|
registerTypes((COSer<CConnection>&)*ccc);
|
||||||
|
registerTypes((CSaveFile&)*ccc);
|
||||||
|
registerTypes((CLoadFile&)*ccc);
|
||||||
|
registerTypes((CTypeList&)*ccc);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
class CBaseForGSApply
|
class CBaseForGSApply
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
#undef DLL_EXPORT
|
#undef DLL_EXPORT
|
||||||
#define DLL_EXPORT
|
#define DLL_EXPORT
|
||||||
#include "../lib/RegisterTypes.h"
|
#include "../lib/RegisterTypes.cpp"
|
||||||
extern std::string NAME;
|
extern std::string NAME;
|
||||||
namespace intpr = boost::interprocess;
|
namespace intpr = boost::interprocess;
|
||||||
|
|
||||||
|
@ -11,106 +11,106 @@
|
|||||||
template<typename Serializer> DLL_EXPORT
|
template<typename Serializer> DLL_EXPORT
|
||||||
void registerTypes1(Serializer &s)
|
void registerTypes1(Serializer &s)
|
||||||
{
|
{
|
||||||
s.registerType<CGHeroInstance>();
|
s.template registerType<CGHeroInstance>();
|
||||||
s.registerType<CGTownInstance>();
|
s.template registerType<CGTownInstance>();
|
||||||
s.registerType<CGEvent>();
|
s.template registerType<CGEvent>();
|
||||||
s.registerType<CGVisitableOPH>();
|
s.template registerType<CGVisitableOPH>();
|
||||||
s.registerType<CGVisitableOPW>();
|
s.template registerType<CGVisitableOPW>();
|
||||||
s.registerType<CGTeleport>();
|
s.template registerType<CGTeleport>();
|
||||||
s.registerType<CGPickable>();
|
s.template registerType<CGPickable>();
|
||||||
s.registerType<CGCreature>();
|
s.template registerType<CGCreature>();
|
||||||
s.registerType<CGSignBottle>();
|
s.template registerType<CGSignBottle>();
|
||||||
s.registerType<CGSeerHut>();
|
s.template registerType<CGSeerHut>();
|
||||||
s.registerType<CGWitchHut>();
|
s.template registerType<CGWitchHut>();
|
||||||
s.registerType<CGScholar>();
|
s.template registerType<CGScholar>();
|
||||||
s.registerType<CGGarrison>();
|
s.template registerType<CGGarrison>();
|
||||||
s.registerType<CGArtifact>();
|
s.template registerType<CGArtifact>();
|
||||||
s.registerType<CGResource>();
|
s.template registerType<CGResource>();
|
||||||
s.registerType<CGMine>();
|
s.template registerType<CGMine>();
|
||||||
s.registerType<CGShrine>();
|
s.template registerType<CGShrine>();
|
||||||
s.registerType<CGPandoraBox>();
|
s.template registerType<CGPandoraBox>();
|
||||||
s.registerType<CGQuestGuard>();
|
s.template registerType<CGQuestGuard>();
|
||||||
s.registerType<CGBonusingObject>();
|
s.template registerType<CGBonusingObject>();
|
||||||
s.registerType<CGMagicWell>();
|
s.template registerType<CGMagicWell>();
|
||||||
s.registerType<CGObservatory>();
|
s.template registerType<CGObservatory>();
|
||||||
s.registerType<CGObjectInstance>();
|
s.template registerType<CGObjectInstance>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Serializer> DLL_EXPORT
|
template<typename Serializer> DLL_EXPORT
|
||||||
void registerTypes2(Serializer &s)
|
void registerTypes2(Serializer &s)
|
||||||
{
|
{
|
||||||
s.registerType<SystemMessage>();
|
s.template registerType<SystemMessage>();
|
||||||
s.registerType<YourTurn>();
|
s.template registerType<YourTurn>();
|
||||||
s.registerType<SetResource>();
|
s.template registerType<SetResource>();
|
||||||
s.registerType<SetResources>();
|
s.template registerType<SetResources>();
|
||||||
s.registerType<SetPrimSkill>();
|
s.template registerType<SetPrimSkill>();
|
||||||
s.registerType<SetSecSkill>();
|
s.template registerType<SetSecSkill>();
|
||||||
s.registerType<HeroVisitCastle>();
|
s.template registerType<HeroVisitCastle>();
|
||||||
s.registerType<ChangeSpells>();
|
s.template registerType<ChangeSpells>();
|
||||||
s.registerType<SetMana>();
|
s.template registerType<SetMana>();
|
||||||
s.registerType<SetMovePoints>();
|
s.template registerType<SetMovePoints>();
|
||||||
s.registerType<FoWChange>();
|
s.template registerType<FoWChange>();
|
||||||
s.registerType<SetAvailableHeroes>();
|
s.template registerType<SetAvailableHeroes>();
|
||||||
s.registerType<GiveBonus>();
|
s.template registerType<GiveBonus>();
|
||||||
s.registerType<ChangeObjPos>();
|
s.template registerType<ChangeObjPos>();
|
||||||
s.registerType<RemoveObject>();
|
s.template registerType<RemoveObject>();
|
||||||
s.registerType<TryMoveHero>();
|
s.template registerType<TryMoveHero>();
|
||||||
s.registerType<SetGarrisons>();
|
s.template registerType<SetGarrisons>();
|
||||||
s.registerType<NewStructures>();
|
s.template registerType<NewStructures>();
|
||||||
s.registerType<SetAvailableCreatures>();
|
s.template registerType<SetAvailableCreatures>();
|
||||||
s.registerType<SetHeroesInTown>();
|
s.template registerType<SetHeroesInTown>();
|
||||||
s.registerType<SetHeroArtifacts>();
|
s.template registerType<SetHeroArtifacts>();
|
||||||
s.registerType<HeroRecruited>();
|
s.template registerType<HeroRecruited>();
|
||||||
s.registerType<GiveHero>();
|
s.template registerType<GiveHero>();
|
||||||
s.registerType<NewTurn>();
|
s.template registerType<NewTurn>();
|
||||||
s.registerType<InfoWindow>();
|
s.template registerType<InfoWindow>();
|
||||||
s.registerType<SetObjectProperty>();
|
s.template registerType<SetObjectProperty>();
|
||||||
s.registerType<SetHoverName>();
|
s.template registerType<SetHoverName>();
|
||||||
s.registerType<HeroLevelUp>();
|
s.template registerType<HeroLevelUp>();
|
||||||
s.registerType<SelectionDialog>();
|
s.template registerType<SelectionDialog>();
|
||||||
s.registerType<YesNoDialog>();
|
s.template registerType<YesNoDialog>();
|
||||||
s.registerType<BattleStart>();
|
s.template registerType<BattleStart>();
|
||||||
s.registerType<BattleNextRound>();
|
s.template registerType<BattleNextRound>();
|
||||||
s.registerType<BattleSetActiveStack>();
|
s.template registerType<BattleSetActiveStack>();
|
||||||
s.registerType<BattleResult>();
|
s.template registerType<BattleResult>();
|
||||||
s.registerType<BattleStackMoved>();
|
s.template registerType<BattleStackMoved>();
|
||||||
s.registerType<BattleStackAttacked>();
|
s.template registerType<BattleStackAttacked>();
|
||||||
s.registerType<BattleAttack>();
|
s.template registerType<BattleAttack>();
|
||||||
s.registerType<StartAction>();
|
s.template registerType<StartAction>();
|
||||||
s.registerType<EndAction>();
|
s.template registerType<EndAction>();
|
||||||
s.registerType<SpellCasted>();
|
s.template registerType<SpellCasted>();
|
||||||
s.registerType<SetStackEffect>();
|
s.template registerType<SetStackEffect>();
|
||||||
s.registerType<ShowInInfobox>();
|
s.template registerType<ShowInInfobox>();
|
||||||
|
|
||||||
s.registerType<SetSelection>();
|
s.template registerType<SetSelection>();
|
||||||
s.registerType<PlayerMessage>();
|
s.template registerType<PlayerMessage>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Serializer> DLL_EXPORT
|
template<typename Serializer> DLL_EXPORT
|
||||||
void registerTypes3(Serializer &s)
|
void registerTypes3(Serializer &s)
|
||||||
{
|
{
|
||||||
s.registerType<SaveGame>();
|
s.template registerType<SaveGame>();
|
||||||
s.registerType<CloseServer>();
|
s.template registerType<CloseServer>();
|
||||||
s.registerType<EndTurn>();
|
s.template registerType<EndTurn>();
|
||||||
s.registerType<DismissHero>();
|
s.template registerType<DismissHero>();
|
||||||
s.registerType<MoveHero>();
|
s.template registerType<MoveHero>();
|
||||||
s.registerType<ArrangeStacks>();
|
s.template registerType<ArrangeStacks>();
|
||||||
s.registerType<DisbandCreature>();
|
s.template registerType<DisbandCreature>();
|
||||||
s.registerType<BuildStructure>();
|
s.template registerType<BuildStructure>();
|
||||||
s.registerType<RecruitCreatures>();
|
s.template registerType<RecruitCreatures>();
|
||||||
s.registerType<UpgradeCreature>();
|
s.template registerType<UpgradeCreature>();
|
||||||
s.registerType<GarrisonHeroSwap>();
|
s.template registerType<GarrisonHeroSwap>();
|
||||||
s.registerType<ExchangeArtifacts>();
|
s.template registerType<ExchangeArtifacts>();
|
||||||
s.registerType<BuyArtifact>();
|
s.template registerType<BuyArtifact>();
|
||||||
s.registerType<TradeOnMarketplace>();
|
s.template registerType<TradeOnMarketplace>();
|
||||||
s.registerType<SetFormation>();
|
s.template registerType<SetFormation>();
|
||||||
s.registerType<HireHero>();
|
s.template registerType<HireHero>();
|
||||||
s.registerType<QueryReply>();
|
s.template registerType<QueryReply>();
|
||||||
s.registerType<MakeAction>();
|
s.template registerType<MakeAction>();
|
||||||
s.registerType<MakeCustomAction>();
|
s.template registerType<MakeCustomAction>();
|
||||||
|
|
||||||
s.registerType<SetSelection>();
|
s.template registerType<SetSelection>();
|
||||||
s.registerType<PlayerMessage>();
|
s.template registerType<PlayerMessage>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Serializer> DLL_EXPORT
|
template<typename Serializer> DLL_EXPORT
|
||||||
@ -120,15 +120,3 @@ void registerTypes(Serializer &s)
|
|||||||
registerTypes2(s);
|
registerTypes2(s);
|
||||||
registerTypes3(s);
|
registerTypes3(s);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void foofoofoo()
|
|
||||||
{
|
|
||||||
//never called function to force instantation of templates
|
|
||||||
int *ccc = NULL;
|
|
||||||
registerTypes((CISer<CConnection>&)*ccc);
|
|
||||||
registerTypes((COSer<CConnection>&)*ccc);
|
|
||||||
registerTypes((CSaveFile&)*ccc);
|
|
||||||
registerTypes((CLoadFile&)*ccc);
|
|
||||||
registerTypes((CTypeList&)*ccc);
|
|
||||||
}
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
#undef DLL_EXPORT
|
#undef DLL_EXPORT
|
||||||
#define DLL_EXPORT
|
#define DLL_EXPORT
|
||||||
#include "../lib/RegisterTypes.h"
|
#include "../lib/RegisterTypes.cpp"
|
||||||
#ifndef _MSC_VER
|
#ifndef _MSC_VER
|
||||||
#include <boost/thread/xtime.hpp>
|
#include <boost/thread/xtime.hpp>
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user