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

Method calc_bson_unsigned_size

Source/Utils/json.hpp:13733–13738  ·  view source on GitHub ↗

! @return The size of the BSON-encoded unsigned integer in @a j */

Source from the content-addressed store, hash-verified

13731 @return The size of the BSON-encoded unsigned integer in @a j
13732 */
13733 static constexpr std::size_t calc_bson_unsigned_size(const std::uint64_t value) noexcept
13734 {
13735 return (value <= static_cast<std::uint64_t>((std::numeric_limits<std::int32_t>::max)()))
13736 ? sizeof(std::int32_t)
13737 : sizeof(std::int64_t);
13738 }
13739
13740 /*!
13741 @brief Writes a BSON element with key @a name and unsigned @a value

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected