Cleanup natures.
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Deukhoofd 2020-04-17 18:50:26 +02:00
parent c5df576dde
commit a9075d7ef3
Signed by: Deukhoofd
GPG Key ID: ADF2E9256009EDCE
1 changed files with 6 additions and 0 deletions

View File

@ -18,6 +18,12 @@ namespace PkmnLib::Library {
explicit NatureLibrary(uint8_t size = 32)
: _items(Arbutils::Collections::Dictionary<Arbutils::CaseInsensitiveConstString, const Nature*>(size)) {}
~NatureLibrary(){
for (auto& kv : _items){
delete kv.second;
}
}
inline void LoadNature(const Arbutils::CaseInsensitiveConstString& name, const Nature* nature) {
_items.Insert(name, nature);
}