MCPcopy Create free account
hub / github.com/OpenPTrack/open_ptrack_v2 / ChopLowBits

Function ChopLowBits

rtpose_wrapper/src/gtest/gtest-all.cpp:2724–2728  ·  view source on GitHub ↗

Chops off the n lowest bits from a bit pattern. Returns the n lowest bits. As a side effect, the original bit pattern will be shifted to the right by n bits.

Source from the content-addressed store, hash-verified

2722// lowest bits. As a side effect, the original bit pattern will be
2723// shifted to the right by n bits.
2724inline UInt32 ChopLowBits(UInt32* bits, int n) {
2725 const UInt32 low_bits = *bits & ((static_cast<UInt32>(1) << n) - 1);
2726 *bits >>= n;
2727 return low_bits;
2728}
2729
2730// Converts a Unicode code point to a narrow string in UTF-8 encoding.
2731// code_point parameter is of type UInt32 because wchar_t may not be

Callers 1

CodePointToUtf8Function · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected