1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-25 22:42:04 +02:00

Use const for ObjectTemplate

This commit is contained in:
AlexVinS
2016-09-08 18:06:28 +03:00
parent 114dac7e81
commit a109580b91
7 changed files with 32 additions and 32 deletions

View File

@@ -185,7 +185,7 @@ void CRewardableConstructor::initTypeData(const JsonNode & config)
objectInfo.init(config);
}
CGObjectInstance * CRewardableConstructor::create(ObjectTemplate tmpl) const
CGObjectInstance * CRewardableConstructor::create(const ObjectTemplate & tmpl) const
{
auto ret = new CRewardableObject();
preInitObject(ret);
@@ -198,7 +198,7 @@ void CRewardableConstructor::configureObject(CGObjectInstance * object, CRandomG
objectInfo.configureObject(dynamic_cast<CRewardableObject*>(object), rng);
}
std::unique_ptr<IObjectInfo> CRewardableConstructor::getObjectInfo(ObjectTemplate tmpl) const
std::unique_ptr<IObjectInfo> CRewardableConstructor::getObjectInfo(const ObjectTemplate & tmpl) const
{
return std::unique_ptr<IObjectInfo>(new CRandomRewardObjectInfo(objectInfo));
}