Used ClangFormat style guide I'm happy with.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
@@ -9,22 +9,22 @@ namespace CreatureLib::Library {
|
||||
class SpeciesLibrary {
|
||||
private:
|
||||
std::unordered_map<std::string, const CreatureSpecies*> _species;
|
||||
|
||||
public:
|
||||
SpeciesLibrary() = default;
|
||||
|
||||
~SpeciesLibrary(){
|
||||
for (auto s: _species)
|
||||
~SpeciesLibrary() {
|
||||
for (auto s : _species)
|
||||
delete s.second;
|
||||
_species.clear();
|
||||
}
|
||||
|
||||
[[nodiscard]] const CreatureSpecies* GetSpecies(const std::string& name) const;
|
||||
[[nodiscard]] const CreatureSpecies* operator[] (const std::string& name) const;
|
||||
[[nodiscard]] const CreatureSpecies* operator[](const std::string& name) const;
|
||||
|
||||
void LoadSpecies(const std::string& name, const CreatureSpecies* species);
|
||||
void DeleteSpecies(const std::string& name);
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif //CREATURELIB_SPECIESLIBRARY_HPP
|
||||
#endif // CREATURELIB_SPECIESLIBRARY_HPP
|
||||
|
||||
Reference in New Issue
Block a user