1
0
mirror of https://github.com/nlohmann/json synced 2024-11-23 20:40:08 +00:00

🔨 clean up

This commit is contained in:
Niels Lohmann 2018-01-28 14:13:02 +01:00
parent 6855bbb902
commit 102c474397
No known key found for this signature in database
GPG Key ID: 7F3CEA63AE251B69
4 changed files with 10 additions and 8 deletions

View File

@ -684,10 +684,11 @@ class binary_writer
@tparam NumberType the type of the number
@note This function needs to respect the system's endianess, because bytes
in CBOR and MessagePack are stored in network order (big endian) and
therefore need reordering on little endian systems.
in CBOR, MessagePack, and UBJSON are stored in network order (big
endian) and therefore need reordering on little endian systems.
*/
template<typename NumberType> void write_number(NumberType n)
template<typename NumberType>
void write_number(const NumberType n)
{
// step 1: write number to array of length NumberType
std::array<CharType, sizeof(NumberType)> vec;

View File

@ -6846,10 +6846,11 @@ class binary_writer
@tparam NumberType the type of the number
@note This function needs to respect the system's endianess, because bytes
in CBOR and MessagePack are stored in network order (big endian) and
therefore need reordering on little endian systems.
in CBOR, MessagePack, and UBJSON are stored in network order (big
endian) and therefore need reordering on little endian systems.
*/
template<typename NumberType> void write_number(NumberType n)
template<typename NumberType>
void write_number(const NumberType n)
{
// step 1: write number to array of length NumberType
std::array<CharType, sizeof(NumberType)> vec;

View File

@ -1703,7 +1703,7 @@ TEST_CASE("CBOR roundtrips", "[hide]")
}
}
TEST_CASE("all first bytes", "[!throws]")
TEST_CASE("all CBOR first bytes", "[!throws]")
{
// these bytes will fail immediately with exception parse_error.112
std::set<uint8_t> unsupported =

View File

@ -2071,7 +2071,7 @@ TEST_CASE("Universal Binary JSON Specification Examples 2")
*/
TEST_CASE("all first bytes", "[!throws]")
TEST_CASE("all UBJSON first bytes", "[!throws]")
{
// these bytes will fail immediately with exception parse_error.112
std::set<uint8_t> supported =