make use_bjdata a non-default parameter

This commit is contained in:
Qianqian Fang 2022-02-22 17:44:35 -05:00
parent 6b9da3bf0a
commit 45a7c365ee
2 changed files with 8 additions and 8 deletions

View File

@ -1299,7 +1299,7 @@ class binary_writer
std::is_floating_point<NumberType>::value, int>::type = 0> std::is_floating_point<NumberType>::value, int>::type = 0>
void write_number_with_ubjson_prefix(const NumberType n, void write_number_with_ubjson_prefix(const NumberType n,
const bool add_prefix, const bool add_prefix,
const bool use_bjdata = false) const bool use_bjdata)
{ {
if (add_prefix) if (add_prefix)
{ {
@ -1313,7 +1313,7 @@ class binary_writer
std::is_unsigned<NumberType>::value, int>::type = 0> std::is_unsigned<NumberType>::value, int>::type = 0>
void write_number_with_ubjson_prefix(const NumberType n, void write_number_with_ubjson_prefix(const NumberType n,
const bool add_prefix, const bool add_prefix,
const bool use_bjdata = false) const bool use_bjdata)
{ {
if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)())) if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)()))
{ {
@ -1401,7 +1401,7 @@ class binary_writer
!std::is_floating_point<NumberType>::value, int >::type = 0 > !std::is_floating_point<NumberType>::value, int >::type = 0 >
void write_number_with_ubjson_prefix(const NumberType n, void write_number_with_ubjson_prefix(const NumberType n,
const bool add_prefix, const bool add_prefix,
const bool use_bjdata = false) const bool use_bjdata)
{ {
if ((std::numeric_limits<std::int8_t>::min)() <= n && n <= (std::numeric_limits<std::int8_t>::max)()) if ((std::numeric_limits<std::int8_t>::min)() <= n && n <= (std::numeric_limits<std::int8_t>::max)())
{ {
@ -1480,7 +1480,7 @@ class binary_writer
/*! /*!
@brief determine the type prefix of container values @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()) switch (j.type())
{ {

View File

@ -15132,7 +15132,7 @@ class binary_writer
std::is_floating_point<NumberType>::value, int>::type = 0> std::is_floating_point<NumberType>::value, int>::type = 0>
void write_number_with_ubjson_prefix(const NumberType n, void write_number_with_ubjson_prefix(const NumberType n,
const bool add_prefix, const bool add_prefix,
const bool use_bjdata = false) const bool use_bjdata)
{ {
if (add_prefix) if (add_prefix)
{ {
@ -15146,7 +15146,7 @@ class binary_writer
std::is_unsigned<NumberType>::value, int>::type = 0> std::is_unsigned<NumberType>::value, int>::type = 0>
void write_number_with_ubjson_prefix(const NumberType n, void write_number_with_ubjson_prefix(const NumberType n,
const bool add_prefix, const bool add_prefix,
const bool use_bjdata = false) const bool use_bjdata)
{ {
if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)())) if (n <= static_cast<std::uint64_t>((std::numeric_limits<std::int8_t>::max)()))
{ {
@ -15234,7 +15234,7 @@ class binary_writer
!std::is_floating_point<NumberType>::value, int >::type = 0 > !std::is_floating_point<NumberType>::value, int >::type = 0 >
void write_number_with_ubjson_prefix(const NumberType n, void write_number_with_ubjson_prefix(const NumberType n,
const bool add_prefix, const bool add_prefix,
const bool use_bjdata = false) const bool use_bjdata)
{ {
if ((std::numeric_limits<std::int8_t>::min)() <= n && n <= (std::numeric_limits<std::int8_t>::max)()) if ((std::numeric_limits<std::int8_t>::min)() <= n && n <= (std::numeric_limits<std::int8_t>::max)())
{ {
@ -15313,7 +15313,7 @@ class binary_writer
/*! /*!
@brief determine the type prefix of container values @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()) switch (j.type())
{ {