Commit 4456f96a authored by gabime's avatar gabime

Fixed clang warnings

parent 8008d7fe
...@@ -42,7 +42,7 @@ struct async_factory_impl ...@@ -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)
{ {
......
...@@ -30,8 +30,8 @@ template<typename Mutex> ...@@ -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)
{ {
} }
......
...@@ -84,8 +84,7 @@ public: ...@@ -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_);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment