MCPcopy Create free account
hub / github.com/apache/kvrocks / DecodeFixed

Function DecodeFixed

src/common/encoding.h:79–85  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

77
78template <typename T>
79constexpr T DecodeFixed(const char *ptr) {
80 T value = 0;
81
82 __builtin_memcpy(&value, ptr, sizeof(value));
83
84 return IsLittleEndian() ? BitSwap(value) : value;
85}
86
87inline uint8_t DecodeFixed8(const char *ptr) { return DecodeFixed<uint8_t>(ptr); }
88inline uint16_t DecodeFixed16(const char *ptr) { return DecodeFixed<uint16_t>(ptr); }

Callers

nothing calls this directly

Calls 2

IsLittleEndianFunction · 0.85
BitSwapFunction · 0.85

Tested by

no test coverage detected