mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-27 22:49:25 +02:00
Use bonus only as shared_ptr to avoid memory corruption
This commit is contained in:
@@ -86,9 +86,9 @@ struct DLL_LINKAGE Reward final
|
||||
std::vector<CStackBasicDescriptor> guards;
|
||||
|
||||
/// list of bonuses, e.g. morale/luck
|
||||
std::vector<Bonus> heroBonuses;
|
||||
std::vector<Bonus> commanderBonuses;
|
||||
std::vector<Bonus> playerBonuses;
|
||||
std::vector<std::shared_ptr<Bonus>> heroBonuses;
|
||||
std::vector<std::shared_ptr<Bonus>> commanderBonuses;
|
||||
std::vector<std::shared_ptr<Bonus>> playerBonuses;
|
||||
|
||||
/// skills that hero may receive or lose
|
||||
std::vector<si32> primary;
|
||||
|
||||
Reference in New Issue
Block a user