MCPcopy Create free account
hub / github.com/DFHack/dfhack / set

Method set

library/include/BitArray.h:125–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

123 }
124
125 void set (T index, bool value = true)
126 {
127 if(!value)
128 {
129 clear(index);
130 return;
131 }
132 size_type byte = index / 8;
133 extend(index);
134 uint8_t bit = 1 << (index % 8);
135 _bits[byte] |= bit;
136 }
137
138 void clear (T index)
139 {

Callers 6

units_getFocusPenaltyFunction · 0.80
getFocusPenaltyMethod · 0.80
set_itemMethod · 0.80
set_flagarray_fieldFunction · 0.80
suspendmanager.cppFile · 0.80

Calls 1

clearFunction · 0.70

Tested by

no test coverage detected