Skip to content

Commit ecafc47

Browse files
committed
Remove comments in snprintf_float regarding %Lg usage
Signed-off-by: rusloker <klokotkov@ya.ru>
1 parent 84f6858 commit ecafc47

2 files changed

Lines changed: 0 additions & 4 deletions

File tree

include/nlohmann/detail/output/serializer.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -835,8 +835,6 @@ class serializer
835835
JSON_HEDLEY_NON_NULL(1)
836836
static int snprintf_float(char* buf, std::size_t size, int d, long double x)
837837
{
838-
// %Lg (not %lg): 'l' has no effect on g/G; only 'L' applies to
839-
// long double. ISO C11 §7.21.6.1 p7; otherwise UB (p9).
840838
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
841839
return (std::snprintf)(buf, size, "%.*Lg", d, x);
842840
}

single_include/nlohmann/json.hpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19817,8 +19817,6 @@ class serializer
1981719817
JSON_HEDLEY_NON_NULL(1)
1981819818
static int snprintf_float(char* buf, std::size_t size, int d, long double x)
1981919819
{
19820-
// %Lg (not %lg): 'l' has no effect on g/G; only 'L' applies to
19821-
// long double. ISO C11 §7.21.6.1 p7; otherwise UB (p9).
1982219820
// NOLINTNEXTLINE(cppcoreguidelines-pro-type-vararg,hicpp-vararg)
1982319821
return (std::snprintf)(buf, size, "%.*Lg", d, x);
1982419822
}

0 commit comments

Comments
 (0)