MCPcopy Create free account
hub / github.com/Wemino/MarkerPatch / ImBitArrayTestBit

Function ImBitArrayTestBit

include/imgui/imgui_internal.h:629–629  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

627inline size_t ImBitArrayGetStorageSizeInBytes(int bitcount) { return (size_t)((bitcount + 31) >> 5) << 2; }
628inline void ImBitArrayClearAllBits(ImU32* arr, int bitcount){ memset(arr, 0, ImBitArrayGetStorageSizeInBytes(bitcount)); }
629inline bool ImBitArrayTestBit(const ImU32* arr, int n) { ImU32 mask = (ImU32)1 << (n & 31); return (arr[n >> 5] & mask) != 0; }
630inline void ImBitArrayClearBit(ImU32* arr, int n) { ImU32 mask = (ImU32)1 << (n & 31); arr[n >> 5] &= ~mask; }
631inline void ImBitArraySetBit(ImU32* arr, int n) { ImU32 mask = (ImU32)1 << (n & 31); arr[n >> 5] |= mask; }
632inline void ImBitArraySetBitRange(ImU32* arr, int n, int n2) // Works on range [n..n2)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected