mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 22:26:22 +00:00
refactor(src/common): remove unused imports (#19506)
* refactor(src/common): remove unused imports * fix: build * chore: fix build * chore: size_t -> std::size_t * chore: fix fuckup from previous commit * chore: fix build * chore: fix build * chore: fix build * chore: fix build with std::size_t * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build * chore: fix build
This commit is contained in:
@@ -17,7 +17,7 @@ template <typename T>
|
||||
class CircularBuffer
|
||||
{
|
||||
public:
|
||||
explicit CircularBuffer(size_t size) :
|
||||
explicit CircularBuffer(std::size_t size) :
|
||||
buf_(std::unique_ptr<T[]>(new T[size])),
|
||||
max_size_(size)
|
||||
{
|
||||
@@ -52,14 +52,14 @@ public:
|
||||
return full_;
|
||||
}
|
||||
|
||||
[[nodiscard]] size_t capacity() const
|
||||
[[nodiscard]] std::size_t capacity() const
|
||||
{
|
||||
return max_size_;
|
||||
}
|
||||
|
||||
[[nodiscard]] size_t size() const
|
||||
[[nodiscard]] std::size_t size() const
|
||||
{
|
||||
size_t size = max_size_;
|
||||
std::size_t size = max_size_;
|
||||
|
||||
if (!full_)
|
||||
{
|
||||
@@ -95,9 +95,9 @@ public:
|
||||
private:
|
||||
std::mutex mutex_;
|
||||
std::unique_ptr<T[]> buf_;
|
||||
size_t head_ = 0;
|
||||
size_t tail_ = 0;
|
||||
const size_t max_size_;
|
||||
std::size_t head_ = 0;
|
||||
std::size_t tail_ = 0;
|
||||
const std::size_t max_size_;
|
||||
bool full_ = false;
|
||||
};
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user