From 6ff52332a802b1776c2e3564f531ac333ea5dffb Mon Sep 17 00:00:00 2001 From: gabime Date: Tue, 3 Sep 2019 14:33:30 +0300 Subject: [PATCH] Remove unused member from backtracer --- include/spdlog/details/backtracer.h | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/include/spdlog/details/backtracer.h b/include/spdlog/details/backtracer.h index a33c6458..5724f8b7 100644 --- a/include/spdlog/details/backtracer.h +++ b/include/spdlog/details/backtracer.h @@ -16,26 +16,16 @@ namespace spdlog { namespace details { class backtracer { - std::mutex mutex_; - size_t n_messages_; + std::mutex mutex_; circular_q messages_; public: - explicit backtracer(size_t n_messages) - : n_messages_{n_messages} - , messages_{n_messages} + explicit backtracer(size_t n_messages) : messages_{n_messages} {} - backtracer(const backtracer &other) - : n_messages_{other.n_messages_} - , messages_{other.messages_} + backtracer(const backtracer &other) : messages_{other.messages_} {} - - size_t n_messages() const - { - return n_messages_; - } - + void add(const log_msg &msg) { std::lock_guard lock{mutex_};