Skip to content

Commit

Permalink
format to small size buffer instead of string
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldreik committed Jun 5, 2019
1 parent 9f00609 commit 6056911
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion fuzzing/chrono_duration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ template <typename Item, typename Ratio>
void doit_impl(fmt::string_view formatstring, const Item item) {
const std::chrono::duration<Item, Ratio> value(item);
try {
std::string message = fmt::format(formatstring, value);
//std::string message = fmt::format(formatstring, value);
fmt::memory_buffer buf;
fmt::format_to(buf, formatstring, value);
} catch (std::exception& e) {
}
}
Expand Down

0 comments on commit 6056911

Please sign in to comment.