Skip to content

Commit

Permalink
add erthink_shodan.
Browse files Browse the repository at this point in the history
  • Loading branch information
erthink committed Jun 21, 2020
1 parent 05ebb5f commit b5166ab
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/erthink_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,14 @@ char *dtoa_erthink(double v, char *const buffer) {
}

REGISTER_TEST(erthink);

char *dtoa_erthink_shodan(double v, char *const buffer) {
erthink::grisu::shodan_printer<true> printer(
buffer, buffer + erthink::grisu::shodan_printer<>::buffer_size);
erthink::grisu::convert(printer, v);
const auto begin_end = printer.finalize_and_get();
*begin_end.second = '\0';
return begin_end.first;
}

REGISTER_TEST(erthink_shodan);

0 comments on commit b5166ab

Please sign in to comment.