Rework for C Interfaces to handle exceptions a bit better.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2020-03-25 19:07:36 +01:00
parent 27288563cd
commit 7ce3e6940d
53 changed files with 7526 additions and 8340 deletions

View File

@@ -1,9 +1,11 @@
#include "Item.hpp"
bool CreatureLib::Library::Item::HasFlag(const Arbutils::CaseInsensitiveConstString& flag) const {
bool CreatureLib::Library::Item::HasFlag(const Arbutils::CaseInsensitiveConstString& flag) const noexcept {
return this->_flags.find(flag) != this->_flags.end();
}
bool CreatureLib::Library::Item::HasFlag(uint32_t flag) const noexcept {
return this->_flags.find(flag) != this->_flags.end();
}
bool CreatureLib::Library::Item::HasFlag(uint32_t flag) const { return this->_flags.find(flag) != this->_flags.end(); }
CreatureLib::Library::Item::Item(const Arbutils::CaseInsensitiveConstString& name,
CreatureLib::Library::ItemCategory category,

View File

@@ -20,13 +20,13 @@ namespace CreatureLib::Library {
Item(const Arbutils::CaseInsensitiveConstString& name, ItemCategory category, BattleItemCategory battleCategory,
int32_t price, std::unordered_set<uint32_t> flags);
inline const Arbutils::CaseInsensitiveConstString& GetName() const { return _name; }
inline ItemCategory GetCategory() const { return _category; }
inline BattleItemCategory GetBattleCategory() const { return _battleCategory; }
inline const int32_t GetPrice() const { return _price; }
inline const Arbutils::CaseInsensitiveConstString& GetName() const noexcept { return _name; }
inline ItemCategory GetCategory() const noexcept { return _category; }
inline BattleItemCategory GetBattleCategory() const noexcept { return _battleCategory; }
inline const int32_t GetPrice() const noexcept { return _price; }
bool HasFlag(const Arbutils::CaseInsensitiveConstString& flag) const;
bool HasFlag(uint32_t flag) const;
bool HasFlag(const Arbutils::CaseInsensitiveConstString& flag) const noexcept;
bool HasFlag(uint32_t flag) const noexcept;
};
}