1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-06-10 23:48:04 +02:00

Fix for Travis

This commit is contained in:
DJWarmonger 2018-07-28 16:02:59 +02:00
parent 5cd366dca3
commit 30f99e7cc1
4 changed files with 4 additions and 4 deletions

View File

@ -77,7 +77,7 @@ TResources ResourceManager::estimateIncome() const
return ret; return ret;
} }
void ResourceManager::reserveResoures(TResources & res, Goals::TSubgoal goal) void ResourceManager::reserveResoures(const TResources & res, Goals::TSubgoal goal)
{ {
if (!goal->invalid()) if (!goal->invalid())
tryPush(ResourceObjective(res, goal)); tryPush(ResourceObjective(res, goal));

View File

@ -85,7 +85,7 @@ public:
bool hasTasksLeft() const override; bool hasTasksLeft() const override;
protected: //not-const actions only for AI protected: //not-const actions only for AI
virtual void reserveResoures(TResources & res, Goals::TSubgoal goal = Goals::TSubgoal()); virtual void reserveResoures(const TResources & res, Goals::TSubgoal goal = Goals::TSubgoal());
virtual bool notifyGoalCompleted(Goals::TSubgoal goal); virtual bool notifyGoalCompleted(Goals::TSubgoal goal);
virtual bool updateGoal(Goals::TSubgoal goal); //new goal must have same properties but different priority virtual bool updateGoal(Goals::TSubgoal goal); //new goal must have same properties but different priority
virtual bool tryPush(const ResourceObjective &o); virtual bool tryPush(const ResourceObjective &o);

View File

@ -2,7 +2,7 @@
#include "mock_ResourceManager.h" #include "mock_ResourceManager.h"
void ResourceManagerMock::reserveResoures(TResources &res, Goals::TSubgoal goal) void ResourceManagerMock::reserveResoures(const TResources &res, Goals::TSubgoal goal)
{ {
ResourceManager::reserveResoures(res, goal); ResourceManager::reserveResoures(res, goal);
} }

View File

@ -13,7 +13,7 @@ class ResourceManagerMock : public ResourceManager
public: public:
using ResourceManager::ResourceManager; using ResourceManager::ResourceManager;
//access protected members, TODO: consider other architecture? //access protected members, TODO: consider other architecture?
void reserveResoures(TResources &res, Goals::TSubgoal goal = Goals::TSubgoal()) override; void reserveResoures(const TResources &res, Goals::TSubgoal goal = Goals::TSubgoal()) override;
bool updateGoal(Goals::TSubgoal goal) override; bool updateGoal(Goals::TSubgoal goal) override;
bool notifyGoalCompleted(Goals::TSubgoal goal) override; bool notifyGoalCompleted(Goals::TSubgoal goal) override;
}; };