mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
refactor(Core): apply clang-tidy modernize-* (#9975)
Co-authored-by: Kitzunu <24550914+Kitzunu@users.noreply.github.com>
This commit is contained in:
@@ -40,24 +40,24 @@ public:
|
||||
full_ = head_ == tail_;
|
||||
}
|
||||
|
||||
bool empty() const
|
||||
[[nodiscard]] bool empty() const
|
||||
{
|
||||
//if head and tail are equal, we are empty
|
||||
return (!full_ && (head_ == tail_));
|
||||
}
|
||||
|
||||
bool full() const
|
||||
[[nodiscard]] bool full() const
|
||||
{
|
||||
//If tail is ahead the head by 1, we are full
|
||||
return full_;
|
||||
}
|
||||
|
||||
size_t capacity() const
|
||||
[[nodiscard]] size_t capacity() const
|
||||
{
|
||||
return max_size_;
|
||||
}
|
||||
|
||||
size_t size() const
|
||||
[[nodiscard]] size_t size() const
|
||||
{
|
||||
size_t size = max_size_;
|
||||
|
||||
@@ -98,6 +98,6 @@ private:
|
||||
size_t head_ = 0;
|
||||
size_t tail_ = 0;
|
||||
const size_t max_size_;
|
||||
bool full_ = 0;
|
||||
bool full_ = false;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user