mirror of
https://github.com/gabime/spdlog.git
synced 2024-12-26 02:21:34 +08:00
astyle applied
This commit is contained in:
parent
5355bd3a8f
commit
de642b6263
@ -90,7 +90,8 @@ public:
|
||||
|
||||
size_t size() const
|
||||
{
|
||||
if (_fd == nullptr) {
|
||||
if (_fd == nullptr)
|
||||
{
|
||||
throw spdlog_ex("Cannot use size() on closed file " + os::filename_to_str(_filename));
|
||||
}
|
||||
return os::filesize(_fd);
|
||||
|
@ -648,7 +648,8 @@ 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));
|
||||
}
|
||||
return details::os::gmtime(log_clock::to_time_t(msg.time));
|
||||
|
@ -235,7 +235,8 @@ 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;
|
||||
}
|
||||
return{ rotation_time + std::chrono::hours(24) };
|
||||
|
Loading…
Reference in New Issue
Block a user