MCPcopy Create free account
hub / github.com/awslabs/aws-lambda-cpp / ChopLowBits

Function ChopLowBits

tests/gtest/gtest-all.cc:3238–3242  ·  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

3236// lowest bits. As a side effect, the original bit pattern will be
3237// shifted to the right by n bits.
3238inline UInt32 ChopLowBits(UInt32* bits, int n) {
3239 const UInt32 low_bits = *bits & ((static_cast<UInt32>(1) << n) - 1);
3240 *bits >>= n;
3241 return low_bits;
3242}
3243
3244// Converts a Unicode code point to a narrow string in UTF-8 encoding.
3245// 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