MCPcopy Create free account
hub / github.com/Aegel5/SimpleSwitcher / ImBitArrayTestBit

Function ImBitArrayTestBit

imgui_tiny_app/imgui/imgui_internal.h:634–634  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

632inline size_t ImBitArrayGetStorageSizeInBytes(int bitcount) { return (size_t)((bitcount + 31) >> 5) << 2; }
633inline void ImBitArrayClearAllBits(ImU32* arr, int bitcount){ memset(arr, 0, ImBitArrayGetStorageSizeInBytes(bitcount)); }
634inline bool ImBitArrayTestBit(const ImU32* arr, int n) { ImU32 mask = (ImU32)1 << (n & 31); return (arr[n >> 5] & mask) != 0; }
635inline void ImBitArrayClearBit(ImU32* arr, int n) { ImU32 mask = (ImU32)1 << (n & 31); arr[n >> 5] &= ~mask; }
636inline void ImBitArraySetBit(ImU32* arr, int n) { ImU32 mask = (ImU32)1 << (n & 31); arr[n >> 5] |= mask; }
637inline 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