Commit d5a3bb52 authored by Daniel Chabrowski's avatar Daniel Chabrowski

readability-else-after-return

parent 9ebb9ff3
......@@ -328,13 +328,10 @@ inline bool spdlog::details::async_log_helper::process_next_msg(log_clock::time_
// Handle empty queue..
// This is the only place where the queue can terminate or flush to avoid losing messages already in the queue
else
{
auto now = details::os::now();
handle_flush_interval(now, last_flush);
sleep_or_yield(now, last_pop);
return !_terminate_requested;
}
}
// flush all sinks if _flush_interval_ms has expired
......
......@@ -403,10 +403,7 @@ inline std::string errno_to_string(char buf[256], int res)
{
return std::string(buf);
}
else
{
return "Unknown error";
}
}
// Return errno string (thread safe)
......
......@@ -662,9 +662,9 @@ inline void spdlog::pattern_formatter::handle_flag(char flag)
inline std::tm spdlog::pattern_formatter::get_time(details::log_msg& msg)
{
if (_pattern_time == pattern_time_type::local)
if (_pattern_time == pattern_time_type::local) {
return details::os::localtime(log_clock::to_time_t(msg.time));
else
}
return details::os::gmtime(log_clock::to_time_t(msg.time));
}
......
......@@ -236,9 +236,9 @@ private:
date.tm_min = _rotation_m;
date.tm_sec = 0;
auto rotation_time = std::chrono::system_clock::from_time_t(std::mktime(&date));
if (rotation_time > now)
if (rotation_time > now) {
return rotation_time;
else
}
return std::chrono::system_clock::time_point(rotation_time + std::chrono::hours(24));
}
......
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