clang-format static-lib

This commit is contained in:
gabime 2019-05-08 17:17:11 +03:00
parent 5d0eb6dda5
commit 1ac6c9f9c2
5 changed files with 30 additions and 38 deletions

View File

@ -23,7 +23,6 @@
#include "spdlog/fmt/fmt.h" #include "spdlog/fmt/fmt.h"
#ifdef SPDLOG_STATIC_LIB #ifdef SPDLOG_STATIC_LIB
#define SPDLOG_INLINE #define SPDLOG_INLINE
#else #else

View File

@ -29,7 +29,6 @@ public:
// stop the worker thread and join it // stop the worker thread and join it
~periodic_worker(); ~periodic_worker();
private: private:
bool active_; bool active_;
std::thread worker_thread_; std::thread worker_thread_;
@ -39,7 +38,6 @@ private:
} // namespace details } // namespace details
} // namespace spdlog } // namespace spdlog
#ifndef SPDLOG_STATIC_LIB #ifndef SPDLOG_STATIC_LIB
#include "spdlog/impl/periodic_worker.cpp" #include "spdlog/impl/periodic_worker.cpp"
#endif #endif

View File

@ -127,7 +127,6 @@ public:
// message all threads to terminate gracefully join them // message all threads to terminate gracefully join them
~thread_pool(); ~thread_pool();
thread_pool(const thread_pool &) = delete; thread_pool(const thread_pool &) = delete;
thread_pool &operator=(thread_pool &&) = delete; thread_pool &operator=(thread_pool &&) = delete;
@ -135,7 +134,6 @@ public:
void post_flush(async_logger_ptr &&worker_ptr, async_overflow_policy overflow_policy); void post_flush(async_logger_ptr &&worker_ptr, async_overflow_policy overflow_policy);
size_t overrun_counter(); size_t overrun_counter();
private: private:
q_type q_; q_type q_;

View File

@ -42,4 +42,3 @@ SPDLOG_INLINE spdlog::details::periodic_worker::~periodic_worker()
worker_thread_.join(); worker_thread_.join();
} }
} }

View File

@ -8,7 +8,8 @@ template class spdlog::details::mpmc_blocking_queue<spdlog::details::async_msg>;
#include "spdlog/common.h" #include "spdlog/common.h"
SPDLOG_INLINE spdlog::details::thread_pool::thread_pool(size_t q_max_items, size_t threads_n) : q_(q_max_items) SPDLOG_INLINE spdlog::details::thread_pool::thread_pool(size_t q_max_items, size_t threads_n)
: q_(q_max_items)
{ {
// std::cout << "thread_pool() q_size_bytes: " << q_size_bytes << // std::cout << "thread_pool() q_size_bytes: " << q_size_bytes <<
// "\tthreads_n: " << threads_n << std::endl; // "\tthreads_n: " << threads_n << std::endl;
@ -43,7 +44,8 @@ SPDLOG_INLINE spdlog::details::thread_pool::~thread_pool()
} }
} }
void SPDLOG_INLINE spdlog::details::thread_pool::post_log(async_logger_ptr &&worker_ptr, details::log_msg &msg, async_overflow_policy overflow_policy) void SPDLOG_INLINE spdlog::details::thread_pool::post_log(
async_logger_ptr &&worker_ptr, details::log_msg &msg, async_overflow_policy overflow_policy)
{ {
async_msg async_m(std::move(worker_ptr), async_msg_type::log, msg); async_msg async_m(std::move(worker_ptr), async_msg_type::log, msg);
post_async_msg_(std::move(async_m), overflow_policy); post_async_msg_(std::move(async_m), overflow_policy);
@ -110,7 +112,3 @@ bool SPDLOG_INLINE spdlog::details::thread_pool::process_next_msg_()
assert(false && "Unexpected async_msg_type"); assert(false && "Unexpected async_msg_type");
return true; return true;
} }