MCPcopy Create free account
hub / github.com/Icinga/icinga2 / PackUInt64BE

Function PackUInt64BE

lib/base/object-packer.cpp:76–90  ·  view source on GitHub ↗

* Append the given int as big-endian 64-bit unsigned int */

Source from the content-addressed store, hash-verified

74 * Append the given int as big-endian 64-bit unsigned int
75 */
76static inline void PackUInt64BE(uint_least64_t i, std::string& builder)
77{
78 char buf[8] = {
79 UIntToByte(i >> 56u),
80 UIntToByte((i >> 48u) & 255u),
81 UIntToByte((i >> 40u) & 255u),
82 UIntToByte((i >> 32u) & 255u),
83 UIntToByte((i >> 24u) & 255u),
84 UIntToByte((i >> 16u) & 255u),
85 UIntToByte((i >> 8u) & 255u),
86 UIntToByte(i & 255u)
87 };
88
89 builder.append((char*)buf, 8);
90}
91
92union Double2BytesConverter
93{

Callers 3

PackStringFunction · 0.85
PackArrayFunction · 0.85
PackDictionaryFunction · 0.85

Calls 1

UIntToByteFunction · 0.70

Tested by

no test coverage detected