mirror of
https://github.com/vcmi/vcmi.git
synced 2025-05-27 22:47:48 +02:00
CBankInfo: fix huge memory leak that appear in long run
This commit is contained in:
parent
1ec7d14637
commit
9f565b81e9
@ -325,10 +325,10 @@ void CBankInstanceConstructor::configureObject(CGObjectInstance * object, CRando
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
CBankInfo::CBankInfo(JsonVector config):
|
CBankInfo::CBankInfo(const JsonVector & Config):
|
||||||
config(config)
|
config(Config)
|
||||||
{
|
{
|
||||||
assert(!config.empty());
|
assert(!Config.empty());
|
||||||
}
|
}
|
||||||
|
|
||||||
static void addStackToArmy(IObjectInfo::CArmyStructure & army, const CCreature * crea, si32 amount)
|
static void addStackToArmy(IObjectInfo::CArmyStructure & army, const CCreature * crea, si32 amount)
|
||||||
|
@ -156,9 +156,9 @@ typedef std::vector<std::pair<ui8, IObjectInfo::CArmyStructure>> TPossibleGuards
|
|||||||
|
|
||||||
class DLL_LINKAGE CBankInfo : public IObjectInfo
|
class DLL_LINKAGE CBankInfo : public IObjectInfo
|
||||||
{
|
{
|
||||||
JsonVector config;
|
const JsonVector & config;
|
||||||
public:
|
public:
|
||||||
CBankInfo(JsonVector config);
|
CBankInfo(const JsonVector & Config);
|
||||||
|
|
||||||
TPossibleGuards getPossibleGuards() const;
|
TPossibleGuards getPossibleGuards() const;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user