mirror of
https://github.com/gabime/spdlog.git
synced 2025-11-16 09:28:56 +08:00
Add coverity scan to CI and fix warnings (#3400)
* Move callback function in thread_pool ctor * Added const qualifiers to logger.h * Remove unused includes from file_helper-inl.h * Fix comments and remove unused include from helpers-inl.h * Fix typo in comment for set_default_logger method. * Use `std::move` for `old_logger` in `set_default_logger`. * Use std::move in example * Wrap `main` content in try block for exception safety. * Added coverity to ci
This commit is contained in:
@@ -35,7 +35,7 @@ SPDLOG_INLINE thread_pool::thread_pool(size_t q_max_items,
|
||||
SPDLOG_INLINE thread_pool::thread_pool(size_t q_max_items,
|
||||
size_t threads_n,
|
||||
std::function<void()> on_thread_start)
|
||||
: thread_pool(q_max_items, threads_n, on_thread_start, [] {}) {}
|
||||
: thread_pool(q_max_items, threads_n, std::move(on_thread_start), [] {}) {}
|
||||
|
||||
SPDLOG_INLINE thread_pool::thread_pool(size_t q_max_items, size_t threads_n)
|
||||
: thread_pool(q_max_items, threads_n, [] {}, [] {}) {}
|
||||
@@ -94,8 +94,7 @@ void SPDLOG_INLINE thread_pool::worker_loop_() {
|
||||
}
|
||||
|
||||
// process next message in the queue
|
||||
// return true if this thread should still be active (while no terminate msg
|
||||
// was received)
|
||||
// returns true if this thread should still be active (while no terminated msg was received)
|
||||
bool SPDLOG_INLINE thread_pool::process_next_msg_() {
|
||||
async_msg incoming_async_msg;
|
||||
q_.dequeue(incoming_async_msg);
|
||||
|
||||
Reference in New Issue
Block a user