Skip to content

Commit

Permalink
add string length to avoid strlen call
Browse files Browse the repository at this point in the history
  • Loading branch information
sunmy committed Jun 8, 2021
1 parent 2789293 commit 12aacc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/fmt/chrono.h
Original file line number Diff line number Diff line change
Expand Up @@ -452,10 +452,10 @@ template <typename Char, typename Duration>
struct formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
Char> : formatter<std::tm, Char> {
FMT_CONSTEXPR FMT_INLINE void generate_defalut_spec(char) {

This comment has been minimized.

Copy link
@chaoticryptidz

chaoticryptidz Jun 8, 2021

do you mean default?

this->specs = "%Y-%m-%d %H:%M:%S";
this->specs = {"%Y-%m-%d %H:%M:%S", 17};
}
FMT_CONSTEXPR FMT_INLINE void generate_defalut_spec(wchar_t) {
this->specs = L"%Y-%m-%d %H:%M:%S";
this->specs = {L"%Y-%m-%d %H:%M:%S", 17};
}

template <typename ParseContext>
Expand Down

0 comments on commit 12aacc2

Please sign in to comment.