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:
Francesco Borzì
2024-07-31 01:06:46 +02:00
committed by GitHub
parent 06a608d244
commit 02a05fbd4c
200 changed files with 522 additions and 581 deletions

View File

@@ -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