mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Use bonus only as shared_ptr to avoid memory corruption
This commit is contained in:
@@ -20,7 +20,7 @@ class DLL_LINKAGE CRewardableConstructor : public AObjectTypeHandler
|
||||
{
|
||||
Rewardable::Info objectInfo;
|
||||
|
||||
void assignBonuses(std::vector<Bonus> & bonuses, MapObjectID objectID) const;
|
||||
void assignBonuses(std::vector<std::shared_ptr<Bonus>> & bonuses, MapObjectID objectID) const;
|
||||
void initTypeData(const JsonNode & config) override;
|
||||
|
||||
bool blockVisit = false;
|
||||
|
||||
Reference in New Issue
Block a user