TerraForge3D  2.3.1
3D Terrain And Landscape Generator

◆ write_bson_integer()

template<typename BasicJsonType , typename CharType >
void nlohmann::detail::binary_writer< BasicJsonType, CharType >::write_bson_integer ( const string_t &  name,
const std::int64_t  value 
)
inlineprivate

Writes a BSON element with key name and integer value.

Definition at line 14874 of file json.hpp.

14876 {
14877 if ((std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)())
14878 {
14879 write_bson_entry_header(name, 0x10); // int32
14880 write_number<std::int32_t, true>(static_cast<std::int32_t>(value));
14881 }
14882
14883 else
14884 {
14885 write_bson_entry_header(name, 0x12); // int64
14886 write_number<std::int64_t, true>(static_cast<std::int64_t>(value));
14887 }
14888 }
void write_bson_entry_header(const string_t &name, const std::uint8_t element_type)
Writes the given element_type and name to the output adapter.
Definition: json.hpp:14803