Skip to content

Commit

Permalink
Cleanup write
Browse files Browse the repository at this point in the history
  • Loading branch information
vitaut committed Dec 30, 2022
1 parent 0c3dd5d commit 72785a3
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions include/fmt/format.h
Original file line number Diff line number Diff line change
Expand Up @@ -3456,11 +3456,8 @@ FMT_CONSTEXPR auto write(OutputIt out, Char value) -> OutputIt {
template <typename Char, typename OutputIt>
FMT_CONSTEXPR_CHAR_TRAITS auto write(OutputIt out, const Char* value)
-> OutputIt {
if (!value) {
throw_format_error("string pointer is null");
} else {
out = write(out, basic_string_view<Char>(value));
}
if (value) return write(out, basic_string_view<Char>(value));
throw_format_error("string pointer is null");
return out;
}

Expand Down

0 comments on commit 72785a3

Please sign in to comment.