Commit 0c16b9ae authored by Chen Hayat's avatar Chen Hayat

Remove casting from previous commit and fix the following Klockwork issues:

1. Removing "return" from void functions.
2. Using "const" for operator= argument.
parent 83d192b1
......@@ -82,7 +82,7 @@ async_msg(async_msg&& other) SPDLOG_NOEXCEPT:
// never copy or assign. should only be moved..
async_msg(const async_msg&) = delete;
async_msg& operator=(async_msg& other) = delete;
async_msg& operator=(const async_msg& other) = delete;
// construct from log_msg
async_msg(const details::log_msg& m) :
......
......@@ -1098,7 +1098,7 @@ inline void format_decimal(Char *buffer, UInt value, unsigned num_digits,
template <typename UInt, typename Char>
inline void format_decimal(Char *buffer, UInt value, unsigned num_digits)
{
return format_decimal(buffer, value, num_digits, NoThousandsSep());
format_decimal(buffer, value, num_digits, NoThousandsSep());
}
#ifndef _WIN32
......@@ -2256,7 +2256,7 @@ public:
void visit_bool(bool value)
{
if (spec_.type_)
return visit_any_int(value);
visit_any_int(value);
write(value);
}
......
......@@ -15,7 +15,10 @@ namespace sinks
class sink
{
public:
sink() { _level = (int)level::trace; }
sink()
{
_level = level::trace;
}
virtual ~sink() {}
virtual void log(const details::log_msg& msg) = 0;
......
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