1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-03-21 21:17:49 +02:00

Fix issues created by type replacement script

This commit is contained in:
Alexander Wilms 2024-01-17 13:59:41 +00:00
parent 73019c204d
commit f08c6d1ce9
7 changed files with 8 additions and 8 deletions

View File

@ -741,7 +741,7 @@ int CPlayerSpecificInfoCallback::howManyTowns() const
std::vector < const CGTownInstance *> CPlayerSpecificInfoCallback::getTownsInfo(bool onlyOur) const
{
//boost::shared_lock<boost::shared_mutex> lock(*gs->mx);
auto < const CGTownInstance *> ret = std::vector < const CGTownInstance *>();
auto ret = std::vector < const CGTownInstance *>();
for(const auto & i : gs->players)
{
for(const auto & town : i.second.towns)

View File

@ -44,8 +44,8 @@ struct DLL_LINKAGE BattleHex //TODO: decide if this should be changed to class f
static constexpr si16 HERO_DEFENDER = GameConstants::BFIELD_WIDTH - 1;
// helpers for rendering
static auto si16 HEX_BEFORE_ALL = std::numeric_limits<si16>::min();
static auto si16 HEX_AFTER_ALL = std::numeric_limits<si16>::max();
static constexpr si16 HEX_BEFORE_ALL = std::numeric_limits<si16>::min();
static constexpr si16 HEX_AFTER_ALL = std::numeric_limits<si16>::max();
static constexpr si16 DESTRUCTIBLE_WALL_1 = 29;
static constexpr si16 DESTRUCTIBLE_WALL_2 = 78;

View File

@ -796,7 +796,7 @@ DamageEstimation CBattleInfoCallback::battleEstimateDamage(const BattleAttackInf
std::vector<std::shared_ptr<const CObstacleInstance>> CBattleInfoCallback::battleGetAllObstaclesOnPos(BattleHex tile, bool onlyBlocking) const
{
auto CObstacleInstance>> obstacles = std::vector<std::shared_ptr<const CObstacleInstance>>();
auto obstacles = std::vector<std::shared_ptr<const CObstacleInstance>>();
RETURN_IF_NOT_BATTLE(obstacles);
for(auto & obs : battleGetAllObstacles())
{

View File

@ -52,7 +52,7 @@ public:
BattleField battleGetBattlefieldType() const override;
int32_t battleGetEnchanterCounter(ui8 side) const;
auto CObstacleInstance> > battleGetAllObstacles(std::optional<BattlePerspective::BattlePerspective> perspective = std::nullopt) const; //returns all obstacles on the battlefield
auto battleGetAllObstacles(std::optional<BattlePerspective::BattlePerspective> perspective = std::nullopt) const; //returns all obstacles on the battlefield
std::shared_ptr<const CObstacleInstance> battleGetObstacleByID(uint32_t ID) const;

View File

@ -24,7 +24,7 @@
VCMI_LIB_NAMESPACE_BEGIN
auto ISimpleResourceLoader*> CResourceHandler::knownLoaders = std::map<std::string, ISimpleResourceLoader*>();
auto CResourceHandler::knownLoaders = std::map<std::string, ISimpleResourceLoader*>();
CResourceHandler CResourceHandler::globalResourceHandler;
CFilesystemGenerator::CFilesystemGenerator(std::string prefix, bool extractArchives):

View File

@ -42,7 +42,7 @@ VCMI_LIB_NAMESPACE_BEGIN
CObjectClassesHandler::CObjectClassesHandler()
{
auto SET_HANDLER_CLASS(STRING, CLASSNAME) handlerConstructors[STRING] = std::make_shared<CLASSNAME>;
#define SET_HANDLER_CLASS(STRING, CLASSNAME) handlerConstructors[STRING] = std::make_shared<CLASSNAME>;
#define SET_HANDLER(STRING, TYPENAME) handlerConstructors[STRING] = std::make_shared<CDefaultObjectTypeHandler<TYPENAME>>
// list of all known handlers, hardcoded for now since the only way to add new objects is via C++ code

View File

@ -89,7 +89,7 @@ public:
static constexpr si32 UNINITIALIZED_MANA = -1;
static constexpr ui32 UNINITIALIZED_MOVEMENT = -1;
static auto TExpType UNINITIALIZED_EXPERIENCE = std::numeric_limits<TExpType>::max();
static constexpr auto UNINITIALIZED_EXPERIENCE = std::numeric_limits<TExpType>::max();
//std::vector<const CArtifact*> artifacts; //hero's artifacts from bag
//std::map<ui16, const CArtifact*> artifWorn; //map<position,artifact_id>; positions: 0 - head; 1 - shoulders; 2 - neck; 3 - right hand; 4 - left hand; 5 - torso; 6 - right ring; 7 - left ring; 8 - feet; 9 - misc1; 10 - misc2; 11 - misc3; 12 - misc4; 13 - mach1; 14 - mach2; 15 - mach3; 16 - mach4; 17 - spellbook; 18 - misc5