Force insertion when setting species variant, as to prevent memory leaks.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-02-08 20:16:47 +01:00
parent 3303dfd82d
commit f973259bef
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 1 additions and 1 deletions

View File

@ -40,7 +40,7 @@ namespace CreatureLib::Library {
[[nodiscard]] Gender GetRandomGender(Core::Random& rand) const;
[[nodiscard]] const std::string& GetName() const;
void SetVariant(const std::string& name, const SpeciesVariant* variant) { _variants[name] = variant; }
void SetVariant(const std::string& name, const SpeciesVariant* variant) { _variants.insert({name, variant}); }
};
}