1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-08-13 19:54:17 +02:00

Fix issues introduced by automated replacement of redundant types

This commit is contained in:
Alexander Wilms
2024-01-17 14:58:27 +00:00
parent 7a1cee1a60
commit b364f707cd
7 changed files with 7 additions and 7 deletions

View File

@@ -192,7 +192,7 @@ public: // public interface for use by client via LOCPLINT access
void showInfoDialog(const std::string &text, std::shared_ptr<CComponent> component); void showInfoDialog(const std::string &text, std::shared_ptr<CComponent> component);
void showInfoDialog(const std::string &text, const std::vector<std::shared_ptr<CComponent>> & components = std::vector<std::shared_ptr<CComponent>>(), int soundID = 0); void showInfoDialog(const std::string &text, const std::vector<std::shared_ptr<CComponent>> & components = std::vector<std::shared_ptr<CComponent>>(), int soundID = 0);
void showInfoDialogAndWait(std::vector<Component> & components, const MetaString & text); void showInfoDialogAndWait(std::vector<Component> & components, const MetaString & text);
auto showYesNoDialog(const std::string &text, CFunctionList<void()> onYes, CFunctionList<void()> onNo, const std::vector<std::shared_ptr<CComponent>> & components = std::vector<std::shared_ptr<CComponent>>()); void showYesNoDialog(const std::string &text, CFunctionList<void()> onYes, CFunctionList<void()> onNo, const std::vector<std::shared_ptr<CComponent>> & components = std::vector<std::shared_ptr<CComponent>>());
void moveHero(const CGHeroInstance *h, const CGPath& path); void moveHero(const CGHeroInstance *h, const CGPath& path);

View File

@@ -118,7 +118,7 @@ void CHighScoreScreen::addHighScores()
{ {
OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE; OBJ_CONSTRUCTION_CAPTURING_ALL_NO_DISPOSE;
auto = std::make_shared<CPicture>(ImagePath::builtin(highscorepage == HighScorePage::SCENARIO ? "HISCORE" : "HISCORE2")); background = std::make_shared<CPicture>(ImagePath::builtin(highscorepage == HighScorePage::SCENARIO ? "HISCORE" : "HISCORE2"));
texts.clear(); texts.clear();
images.clear(); images.clear();

View File

@@ -35,7 +35,7 @@ public:
class HighScoreCalculation class HighScoreCalculation
{ {
public: public:
auto parameters = std::vector<HighScoreParameter>(); std::vector<HighScoreParameter> parameters = std::vector<HighScoreParameter>();
bool isCampaign = false; bool isCampaign = false;
auto calculate(); auto calculate();

View File

@@ -49,7 +49,7 @@ std::vector<JsonNode> BattleFieldHandler::loadLegacyData()
const std::vector<std::string> & BattleFieldHandler::getTypeNames() const const std::vector<std::string> & BattleFieldHandler::getTypeNames() const
{ {
static auto std::vector<std::string> types = std::vector<std::string> { "battlefield" }; static const auto types = std::vector<std::string> { "battlefield" };
return types; return types;
} }

View File

@@ -534,7 +534,7 @@ R CTownHandler::getMappedValue(const JsonNode & node, const R defval, const std:
void CTownHandler::addBonusesForVanilaBuilding(CBuilding * building) const void CTownHandler::addBonusesForVanilaBuilding(CBuilding * building) const
{ {
std::shared_ptr<Bonus> b; std::shared_ptr<Bonus> b;
static auto playerPropagator = std::make_shared<CPropagatorNodeType>(CBonusSystemNode::ENodeTypes::PLAYER); static TPropagatorPtr playerPropagator = std::make_shared<CPropagatorNodeType>(CBonusSystemNode::ENodeTypes::PLAYER);
if(building->bid == BuildingID::TAVERN) if(building->bid == BuildingID::TAVERN)
{ {

View File

@@ -54,7 +54,7 @@ void Progress::reset(int s)
void Progress::finish() void Progress::finish()
{ {
auto = _target = std::numeric_limits<Type>::max(); _progress = _target = std::numeric_limits<Type>::max();
_step = std::numeric_limits<Type>::min(); _step = std::numeric_limits<Type>::min();
_maxSteps = std::numeric_limits<Type>::min(); _maxSteps = std::numeric_limits<Type>::min();
} }

View File

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