diff --git a/include/nlohmann/detail/output/binary_writer.hpp b/include/nlohmann/detail/output/binary_writer.hpp index 0659dd013..49369e023 100644 --- a/include/nlohmann/detail/output/binary_writer.hpp +++ b/include/nlohmann/detail/output/binary_writer.hpp @@ -1299,7 +1299,7 @@ class binary_writer std::is_floating_point::value, int>::type = 0> void write_number_with_ubjson_prefix(const NumberType n, const bool add_prefix, - const bool use_bjdata = false) + const bool use_bjdata) { if (add_prefix) { @@ -1313,7 +1313,7 @@ class binary_writer std::is_unsigned::value, int>::type = 0> void write_number_with_ubjson_prefix(const NumberType n, const bool add_prefix, - const bool use_bjdata = false) + const bool use_bjdata) { if (n <= static_cast((std::numeric_limits::max)())) { @@ -1401,7 +1401,7 @@ class binary_writer !std::is_floating_point::value, int >::type = 0 > void write_number_with_ubjson_prefix(const NumberType n, const bool add_prefix, - const bool use_bjdata = false) + const bool use_bjdata) { if ((std::numeric_limits::min)() <= n && n <= (std::numeric_limits::max)()) { @@ -1480,7 +1480,7 @@ class binary_writer /*! @brief determine the type prefix of container values */ - CharType ubjson_prefix(const BasicJsonType& j, const bool use_bjdata = false) const noexcept + CharType ubjson_prefix(const BasicJsonType& j, const bool use_bjdata) const noexcept { switch (j.type()) { diff --git a/single_include/nlohmann/json.hpp b/single_include/nlohmann/json.hpp index 3b432fdf5..44ed8dc89 100644 --- a/single_include/nlohmann/json.hpp +++ b/single_include/nlohmann/json.hpp @@ -15132,7 +15132,7 @@ class binary_writer std::is_floating_point::value, int>::type = 0> void write_number_with_ubjson_prefix(const NumberType n, const bool add_prefix, - const bool use_bjdata = false) + const bool use_bjdata) { if (add_prefix) { @@ -15146,7 +15146,7 @@ class binary_writer std::is_unsigned::value, int>::type = 0> void write_number_with_ubjson_prefix(const NumberType n, const bool add_prefix, - const bool use_bjdata = false) + const bool use_bjdata) { if (n <= static_cast((std::numeric_limits::max)())) { @@ -15234,7 +15234,7 @@ class binary_writer !std::is_floating_point::value, int >::type = 0 > void write_number_with_ubjson_prefix(const NumberType n, const bool add_prefix, - const bool use_bjdata = false) + const bool use_bjdata) { if ((std::numeric_limits::min)() <= n && n <= (std::numeric_limits::max)()) { @@ -15313,7 +15313,7 @@ class binary_writer /*! @brief determine the type prefix of container values */ - CharType ubjson_prefix(const BasicJsonType& j, const bool use_bjdata = false) const noexcept + CharType ubjson_prefix(const BasicJsonType& j, const bool use_bjdata) const noexcept { switch (j.type()) {