Rework for C Interfaces to handle exceptions a bit better.
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,9 +9,9 @@ CreatureLib::Library::AttackData::AttackData(const ConstString& name, uint8_t ty
|
||||
: _name(std::move(name)), _type(type), _category(category), _basePower(power), _accuracy(accuracy),
|
||||
_baseUsages(baseUsage), _target(target), _priority(priority), _flags(std::move(flags)) {}
|
||||
|
||||
bool CreatureLib::Library::AttackData::HasFlag(const ConstString& key) const {
|
||||
bool CreatureLib::Library::AttackData::HasFlag(const ConstString& key) const noexcept {
|
||||
return this->_flags.find(key) != this->_flags.end();
|
||||
}
|
||||
bool CreatureLib::Library::AttackData::HasFlag(uint32_t key) const {
|
||||
bool CreatureLib::Library::AttackData::HasFlag(uint32_t key) const noexcept {
|
||||
return this->_flags.find(key) != this->_flags.end();
|
||||
}
|
||||
|
||||
@@ -27,17 +27,17 @@ namespace CreatureLib::Library {
|
||||
uint8_t baseUsage, AttackTarget target, int8_t priority, std::unordered_set<uint32_t> flags);
|
||||
virtual ~AttackData() = default;
|
||||
|
||||
inline const ConstString& GetName() const { return _name; }
|
||||
inline const uint8_t GetType() const { return _type; }
|
||||
inline AttackCategory GetCategory() const { return _category; }
|
||||
inline uint8_t GetBasePower() const { return _basePower; }
|
||||
inline uint8_t GetAccuracy() const { return _accuracy; }
|
||||
inline uint8_t GetBaseUsages() const { return _baseUsages; }
|
||||
inline AttackTarget GetTarget() const { return _target; }
|
||||
inline int8_t GetPriority() const { return _priority; }
|
||||
inline const ConstString& GetName() const noexcept { return _name; }
|
||||
inline const uint8_t GetType() const noexcept { return _type; }
|
||||
inline AttackCategory GetCategory() const noexcept { return _category; }
|
||||
inline uint8_t GetBasePower() const noexcept { return _basePower; }
|
||||
inline uint8_t GetAccuracy() const noexcept { return _accuracy; }
|
||||
inline uint8_t GetBaseUsages() const noexcept { return _baseUsages; }
|
||||
inline AttackTarget GetTarget() const noexcept { return _target; }
|
||||
inline int8_t GetPriority() const noexcept { return _priority; }
|
||||
|
||||
bool HasFlag(const ConstString& key) const;
|
||||
bool HasFlag(uint32_t keyHash) const;
|
||||
bool HasFlag(const ConstString& key) const noexcept;
|
||||
bool HasFlag(uint32_t keyHash) const noexcept;
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user