Make Growth Rate library use unique_ptr

This commit is contained in:
2020-05-26 14:58:16 +02:00
parent aba56d2fdd
commit ecf1c47a53
2 changed files with 6 additions and 9 deletions

View File

@@ -37,9 +37,9 @@ uint32_t CreatureLib::Library::GrowthRateLibrary::CalculateExperience(uint32_t h
void CreatureLib::Library::GrowthRateLibrary::AddGrowthRate(const ConstString& name,
CreatureLib::Library::GrowthRate* rate) {
_growthRates.insert({name, rate});
_growthRates.insert({name, std::unique_ptr<const GrowthRate>(rate)});
}
void CreatureLib::Library::GrowthRateLibrary::AddGrowthRate(uint32_t hash, CreatureLib::Library::GrowthRate* rate) {
_growthRates.insert({hash, rate});
_growthRates.insert({hash, std::unique_ptr<const GrowthRate>(rate)});
}