mirror of
https://github.com/vcmi/vcmi.git
synced 2024-12-16 10:19:47 +02:00
6d8f1e4530
Replaced const TBonusListPtr with TConstBonusListPtr where necessary Replaced const std::shared_ptr<T> with std::shared_ptr<const T> where necessary. Removed superfluous use of const. Replaced const std::shared_ptr<T> with const std::shared_ptr<T> & in function parameters and ranged for-loops.
33 lines
756 B
C++
33 lines
756 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/HeroBonus.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 CBonusSystemNode * root = nullptr, const std::string & cachingStr = "") const override;
|
|
|
|
int64_t getTreeVersion() const override;
|
|
private:
|
|
mutable BonusList bonuses;
|
|
|
|
mutable int64_t cachedLast;
|
|
int32_t treeVersion;
|
|
};
|