MCPcopy Create free account
hub / github.com/deathkiller/jazz2-native / setAll

Method setAll

Sources/nCine/Base/BitArray.cpp:131–141  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129 }
130
131 void BitArray::setAll()
132 {
133 std::size_t size = BITS_TO_CHARS(_size);
134 std::fill_n(_data, size, UINT8_MAX);
135
136 std::size_t bits = (_size % CHAR_BIT);
137 if (bits != 0) {
138 std::uint8_t mask = UCHAR_MAX << (CHAR_BIT - bits);
139 _data[BIT_CHAR(_size - 1)] = mask;
140 }
141 }
142
143 void BitArray::resetAll()
144 {

Callers 2

Calls

no outgoing calls

Tested by

no test coverage detected