mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 18:11:33 +08:00
Update circular_q.h
This commit is contained in:
parent
98ec35cee1
commit
28845b96bd
@ -11,6 +11,12 @@ namespace spdlog {
|
|||||||
template<typename T>
|
template<typename T>
|
||||||
class circular_q
|
class circular_q
|
||||||
{
|
{
|
||||||
|
size_t max_items_ = 0;
|
||||||
|
typename std::vector<T>::size_type head_ = 0;
|
||||||
|
typename std::vector<T>::size_type tail_ = 0;
|
||||||
|
size_t overrun_counter_ = 0;
|
||||||
|
std::vector<T> v_;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
using item_type = T;
|
using item_type = T;
|
||||||
|
|
||||||
@ -84,14 +90,7 @@ namespace spdlog {
|
|||||||
return overrun_counter_;
|
return overrun_counter_;
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
size_t max_items_ = 0;
|
|
||||||
typename std::vector<T>::size_type head_ = 0;
|
|
||||||
typename std::vector<T>::size_type tail_ = 0;
|
|
||||||
size_t overrun_counter_ = 0;
|
|
||||||
std::vector<T> v_;
|
|
||||||
|
|
||||||
|
|
||||||
void copy_moveable(circular_q&& other) SPDLOG_NOEXCEPT
|
void copy_moveable(circular_q&& other) SPDLOG_NOEXCEPT
|
||||||
{
|
{
|
||||||
max_items_ = other.max_items_;
|
max_items_ = other.max_items_;
|
||||||
|
Loading…
Reference in New Issue
Block a user