mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Fix for Travis
This commit is contained in:
parent
5cd366dca3
commit
30f99e7cc1
@ -77,7 +77,7 @@ TResources ResourceManager::estimateIncome() const
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ResourceManager::reserveResoures(TResources & res, Goals::TSubgoal goal)
|
||||
void ResourceManager::reserveResoures(const TResources & res, Goals::TSubgoal goal)
|
||||
{
|
||||
if (!goal->invalid())
|
||||
tryPush(ResourceObjective(res, goal));
|
||||
|
@ -85,7 +85,7 @@ public:
|
||||
bool hasTasksLeft() const override;
|
||||
|
||||
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 updateGoal(Goals::TSubgoal goal); //new goal must have same properties but different priority
|
||||
virtual bool tryPush(const ResourceObjective &o);
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
#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);
|
||||
}
|
||||
|
@ -13,7 +13,7 @@ class ResourceManagerMock : public ResourceManager
|
||||
public:
|
||||
using ResourceManager::ResourceManager;
|
||||
//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 notifyGoalCompleted(Goals::TSubgoal goal) override;
|
||||
};
|
Loading…
Reference in New Issue
Block a user