MCPcopy Create free account
hub / github.com/Open-GD/OpenGD / calc_bson_integer_size

Method calc_bson_integer_size

Source/external/json.hpp:15952–15957  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

15950 @return The size of the BSON-encoded integer @a value
15951 */
15952 static std::size_t calc_bson_integer_size(const std::int64_t value)
15953 {
15954 return (std::numeric_limits<std::int32_t>::min)() <= value && value <= (std::numeric_limits<std::int32_t>::max)()
15955 ? sizeof(std::int32_t)
15956 : sizeof(std::int64_t);
15957 }
15958
15959 /*!
15960 @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