Fixed clang warnings

This commit is contained in:
gabime 2018-08-13 09:21:47 +03:00
parent 8008d7fe53
commit 4456f96ae3
3 changed files with 4 additions and 5 deletions

View File

@ -42,7 +42,7 @@ struct async_factory_impl
auto &registry_inst = details::registry::instance(); auto &registry_inst = details::registry::instance();
// create global thread pool if not already exists.. // create global thread pool if not already exists..
std::lock_guard<std::recursive_mutex>(registry_inst.tp_mutex()); std::lock_guard<std::recursive_mutex> lock(registry_inst.tp_mutex());
auto tp = registry_inst.get_tp(); auto tp = registry_inst.get_tp();
if (tp == nullptr) if (tp == nullptr)
{ {

View File

@ -30,8 +30,8 @@ template<typename Mutex>
class android_sink SPDLOG_FINAL : public base_sink<Mutex> class android_sink SPDLOG_FINAL : public base_sink<Mutex>
{ {
public: public:
explicit android_sink(const std::string &tag = "spdlog", bool use_raw_msg = false) explicit android_sink(std::string tag = "spdlog", bool use_raw_msg = false)
: tag_(tag) : tag_(std::move(tag))
, use_raw_msg_(use_raw_msg) , use_raw_msg_(use_raw_msg)
{ {
} }

View File

@ -84,8 +84,7 @@ public:
const std::string on_cyan = "\033[46m"; const std::string on_cyan = "\033[46m";
const std::string on_white = "\033[47m"; const std::string on_white = "\033[47m";
void log(const details::log_msg &msg) SPDLOG_FINAL override void log(const details::log_msg &msg) SPDLOG_FINAL {
{
// Wrap the originally formatted message in color codes. // Wrap the originally formatted message in color codes.
// If color is not supported in the terminal, log as is instead. // If color is not supported in the terminal, log as is instead.
std::lock_guard<mutex_t> lock(mutex_); std::lock_guard<mutex_t> lock(mutex_);