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

1. Removing "return" from void functions.
2. Using "const" for operator= argument.
This commit is contained in:
Chen Hayat 2016-11-01 17:16:07 +02:00
parent 83d192b1f1
commit 0c16b9ae1e
3 changed files with 7 additions and 4 deletions

View File

@ -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) :

View File

@ -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);
}

View File

@ -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;