mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-25 01:51:38 +08:00
use size_t instead of int for overrun counter
This commit is contained in:
parent
863f704f47
commit
c543985cf4
@ -54,7 +54,7 @@ public:
|
|||||||
return ((tail_ + 1) % max_items_) == head_;
|
return ((tail_ + 1) % max_items_) == head_;
|
||||||
}
|
}
|
||||||
|
|
||||||
int overrun_counter() const
|
size_t overrun_counter() const
|
||||||
{
|
{
|
||||||
return overrun_counter_;
|
return overrun_counter_;
|
||||||
}
|
}
|
||||||
@ -66,7 +66,7 @@ private:
|
|||||||
|
|
||||||
std::vector<T> v_;
|
std::vector<T> v_;
|
||||||
|
|
||||||
int overrun_counter_ = 0;
|
size_t overrun_counter_ = 0;
|
||||||
};
|
};
|
||||||
} // namespace details
|
} // namespace details
|
||||||
} // namespace spdlog
|
} // namespace spdlog
|
||||||
|
@ -30,7 +30,7 @@ public:
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
int overrun_counter() const
|
size_t overrun_counter() const
|
||||||
{
|
{
|
||||||
return q_.overrun_counter();
|
return q_.overrun_counter();
|
||||||
}
|
}
|
||||||
|
@ -157,7 +157,7 @@ public:
|
|||||||
post_async_msg_(async_msg(std::move(worker_ptr), async_msg_type::flush), overflow_policy);
|
post_async_msg_(async_msg(std::move(worker_ptr), async_msg_type::flush), overflow_policy);
|
||||||
}
|
}
|
||||||
|
|
||||||
int overrun_counter() const
|
size_t overrun_counter() const
|
||||||
{
|
{
|
||||||
return q_.overrun_counter();
|
return q_.overrun_counter();
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ TEST_CASE("basic async test ", "[async]")
|
|||||||
{
|
{
|
||||||
using namespace spdlog;
|
using namespace spdlog;
|
||||||
auto test_sink = std::make_shared<sinks::test_sink_mt>();
|
auto test_sink = std::make_shared<sinks::test_sink_mt>();
|
||||||
int overrun_counter = 0;
|
size_t overrun_counter = 0;
|
||||||
size_t queue_size = 128;
|
size_t queue_size = 128;
|
||||||
size_t messages = 256;
|
size_t messages = 256;
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user