mirror of
https://github.com/vcmi/vcmi.git
synced 2025-06-15 00:05:02 +02:00
Map objects now use shared_ptr (game)
This commit is contained in:
@ -37,10 +37,10 @@ bool CRewardableConstructor::hasNameTextID() const
|
||||
return !objectInfo.getParameters()["name"].isNull();
|
||||
}
|
||||
|
||||
CGObjectInstance * CRewardableConstructor::create(IGameCallback * cb, std::shared_ptr<const ObjectTemplate> tmpl) const
|
||||
std::shared_ptr<CGObjectInstance> CRewardableConstructor::create(IGameCallback * cb, std::shared_ptr<const ObjectTemplate> tmpl) const
|
||||
{
|
||||
auto * ret = new CRewardableObject(cb);
|
||||
preInitObject(ret);
|
||||
auto ret = std::make_shared<CRewardableObject>(cb);
|
||||
preInitObject(ret.get());
|
||||
ret->appearance = tmpl;
|
||||
ret->blockVisit = blockVisit;
|
||||
return ret;
|
||||
|
Reference in New Issue
Block a user