mirror of
https://github.com/vcmi/vcmi.git
synced 2025-08-13 19:54:17 +02:00
- gcc 4.5 compatibility
This commit is contained in:
@@ -527,7 +527,7 @@ void CArtHandler::getAllowedArts(std::vector<ConstTransitivePtr<CArtifact> > &ou
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Bonus *createBonus(Bonus::BonusType type, int val, int subtype, int valType, shared_ptr<ILimiter> limiter = nullptr, int additionalInfo = 0)
|
Bonus *createBonus(Bonus::BonusType type, int val, int subtype, int valType, shared_ptr<ILimiter> limiter = shared_ptr<ILimiter>(), int additionalInfo = 0)
|
||||||
{
|
{
|
||||||
Bonus *added = new Bonus(Bonus::PERMANENT,type,Bonus::ARTIFACT,val,-1,subtype);
|
Bonus *added = new Bonus(Bonus::PERMANENT,type,Bonus::ARTIFACT,val,-1,subtype);
|
||||||
added->additionalInfo = additionalInfo;
|
added->additionalInfo = additionalInfo;
|
||||||
@@ -536,7 +536,7 @@ Bonus *createBonus(Bonus::BonusType type, int val, int subtype, int valType, sha
|
|||||||
return added;
|
return added;
|
||||||
}
|
}
|
||||||
|
|
||||||
Bonus *createBonus(Bonus::BonusType type, int val, int subtype, shared_ptr<IPropagator> propagator = nullptr, int additionalInfo = 0)
|
Bonus *createBonus(Bonus::BonusType type, int val, int subtype, shared_ptr<IPropagator> propagator = shared_ptr<IPropagator>(), int additionalInfo = 0)
|
||||||
{
|
{
|
||||||
Bonus *added = new Bonus(Bonus::PERMANENT,type,Bonus::ARTIFACT,val,-1,subtype);
|
Bonus *added = new Bonus(Bonus::PERMANENT,type,Bonus::ARTIFACT,val,-1,subtype);
|
||||||
added->additionalInfo = additionalInfo;
|
added->additionalInfo = additionalInfo;
|
||||||
|
@@ -198,7 +198,7 @@ public:
|
|||||||
|
|
||||||
class DLL_LINKAGE CArtHandler //handles artifacts
|
class DLL_LINKAGE CArtHandler //handles artifacts
|
||||||
{
|
{
|
||||||
void giveArtBonus(TArtifactID aid, Bonus::BonusType type, int val, int subtype = -1, int valType = Bonus::BASE_NUMBER, shared_ptr<ILimiter> limiter = NULL, int additionalinfo = 0);
|
void giveArtBonus(TArtifactID aid, Bonus::BonusType type, int val, int subtype = -1, int valType = Bonus::BASE_NUMBER, shared_ptr<ILimiter> limiter = shared_ptr<ILimiter>(), int additionalinfo = 0);
|
||||||
void giveArtBonus(TArtifactID aid, Bonus::BonusType type, int val, int subtype, shared_ptr<IPropagator> propagator, int additionalinfo = 0);
|
void giveArtBonus(TArtifactID aid, Bonus::BonusType type, int val, int subtype, shared_ptr<IPropagator> propagator, int additionalinfo = 0);
|
||||||
void giveArtBonus(TArtifactID aid, Bonus *bonus);
|
void giveArtBonus(TArtifactID aid, Bonus *bonus);
|
||||||
public:
|
public:
|
||||||
|
@@ -1042,11 +1042,11 @@ DLL_LINKAGE void UnparseBonus( JsonNode &node, const Bonus * bonus )
|
|||||||
node["effectRange"].String() = reverseMapFirst<std::string, int>(bonus->effectRange, bonusLimitEffect);
|
node["effectRange"].String() = reverseMapFirst<std::string, int>(bonus->effectRange, bonusLimitEffect);
|
||||||
node["duration"].String() = reverseMapFirst<std::string, int>(bonus->duration, bonusDurationMap);
|
node["duration"].String() = reverseMapFirst<std::string, int>(bonus->duration, bonusDurationMap);
|
||||||
node["source"].String() = reverseMapFirst<std::string, int>(bonus->source, bonusSourceMap);
|
node["source"].String() = reverseMapFirst<std::string, int>(bonus->source, bonusSourceMap);
|
||||||
if(bonus->limiter != nullptr)
|
if(bonus->limiter)
|
||||||
{
|
{
|
||||||
node["limiter"].String() = reverseMapFirst<std::string, TLimiterPtr>(bonus->limiter, bonusLimiterMap);
|
node["limiter"].String() = reverseMapFirst<std::string, TLimiterPtr>(bonus->limiter, bonusLimiterMap);
|
||||||
}
|
}
|
||||||
if(bonus->propagator != nullptr)
|
if(bonus->propagator)
|
||||||
{
|
{
|
||||||
node["propagator"].String() = reverseMapFirst<std::string, TPropagatorPtr>(bonus->propagator, bonusPropagatorMap);
|
node["propagator"].String() = reverseMapFirst<std::string, TPropagatorPtr>(bonus->propagator, bonusPropagatorMap);
|
||||||
}
|
}
|
||||||
|
@@ -103,6 +103,5 @@ struct StartInfo
|
|||||||
{
|
{
|
||||||
mapfileChecksum = seedPostInit = seedToBeUsed = 0;
|
mapfileChecksum = seedPostInit = seedToBeUsed = 0;
|
||||||
mode = INVALID;
|
mode = INVALID;
|
||||||
campState = nullptr;
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
Reference in New Issue
Block a user