1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-12-22 22:13:35 +02:00
vcmi/test/mock/mock_BonusBearer.h
K 462c79e190 remove never used code in CBonusSystemNode
Method CBonusSystemNode::getAllBonuses have 'root' parameter which is never
set to anythig else than nullptr. This patch removes the parameter and all
code that depends on it as preparatory work for further bonus system
optimization.
2024-08-25 14:15:21 +02:00

35 lines
804 B
C++

/*
* mock_BonusBearer.h, part of VCMI engine
*
* Authors: listed in file AUTHORS in main folder
*
* License: GNU General Public License v2.0 or later
* Full text of license available in license.txt file, in main folder
*
*/
#pragma once
#include "../../lib/bonuses/BonusList.h"
#include "../../lib/bonuses/Bonus.h"
#include "../../lib/bonuses/IBonusBearer.h"
class BonusBearerMock : public IBonusBearer
{
public:
BonusBearerMock();
virtual ~BonusBearerMock();
void addNewBonus(const std::shared_ptr<Bonus> & b);
TConstBonusListPtr getAllBonuses(const CSelector & selector, const CSelector & limit, const std::string & cachingStr = "") const override;
int64_t getTreeVersion() const override;
private:
mutable BonusList bonuses;
mutable int64_t cachedLast;
int32_t treeVersion;
};