Skip to content
forked from fmtlib/fmt

Commit

Permalink
Merge pull request #87 from fmtlib/master
Browse files Browse the repository at this point in the history
improved use of find (fmtlib#1560)
  • Loading branch information
sthagen authored Feb 22, 2020
2 parents 0fedfe5 + e00997b commit 5c5af52
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -2543,7 +2543,7 @@ FMT_CONSTEXPR void parse_format_string(basic_string_view<Char> format_str,
// Doing two passes with memchr (one for '{' and another for '}') is up to
// 2.5x faster than the naive one-pass implementation on big format strings.
const Char* p = begin;
if (*begin != '{' && !find<IS_CONSTEXPR>(begin, end, '{', p))
if (*begin != '{' && !find<IS_CONSTEXPR>(begin + 1, end, '{', p))
return write(begin, end);
write(begin, p);
++p;
Expand Down

0 comments on commit 5c5af52

Please sign in to comment.