MCPcopy Create free account
hub / github.com/OpenFodder/openfodder / calc_bson_integer_size

Method calc_bson_integer_size

Source/Utils/json.hpp:13705–13710  ·  view source on GitHub ↗

! @return The size of the BSON-encoded integer @a value */

Source from the content-addressed store, hash-verified

13703 @return The size of the BSON-encoded integer @a value
13704 */
13705 static std::size_t calc_bson_integer_size(const std::int64_t value)
13706 {
13707 return (std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)()
13708 ? sizeof(std::int32_t)
13709 : sizeof(std::int64_t);
13710 }
13711
13712 /*!
13713 @brief Writes a BSON element with key @a name and integer @a value

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected