Skip to content

Commit

Permalink
clang format
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldreik committed May 5, 2019
1 parent bb375e1 commit 7de0fde
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -451,18 +451,16 @@ struct chrono_formatter {
*out++ = '-';
}


if constexpr (is_floating_point) {
auto tmpseconds = std::chrono::duration_cast<seconds>(d);
s=seconds{std::floor(tmpseconds.count())};
ms = std::chrono::duration_cast<milliseconds>(tmpseconds - s);
auto tmpseconds = std::chrono::duration_cast<seconds>(d);
s = seconds{std::floor(tmpseconds.count())};
ms = std::chrono::duration_cast<milliseconds>(tmpseconds - s);
if (!std::isfinite(s.count()) || !std::isfinite(ms.count())) {
FMT_THROW(format_error("internal overflow of floating point duration"));
}
} else {
s = std::chrono::duration_cast<seconds>(d);
ms = std::chrono::duration_cast<milliseconds>(d - s);

s = std::chrono::duration_cast<seconds>(d);
ms = std::chrono::duration_cast<milliseconds>(d - s);
}
}

Expand Down

0 comments on commit 7de0fde

Please sign in to comment.