| 384 | vtkArrayDownCast_FastCastMacro(vtkBitArray); |
| 385 | |
| 386 | inline void vtkBitArray::SetValue(vtkIdType id, int value) |
| 387 | { |
| 388 | const auto bitsetDiv = std::div(id, static_cast<vtkIdType>(8)); |
| 389 | const vtkIdType &bitsetId = bitsetDiv.quot, &bitId = bitsetDiv.rem; |
| 390 | ValueType mask = 0x80 >> bitId; // NOLINT(clang-analyzer-core.BitwiseShift) |
| 391 | this->Array[bitsetId] = static_cast<ValueType>( |
| 392 | (value != 0) ? (this->Array[bitsetId] | mask) : (this->Array[bitsetId] & (~mask))); |
| 393 | this->DataChanged(); |
| 394 | } |
| 395 | |
| 396 | inline void vtkBitArray::InsertValue(vtkIdType id, int value) |
| 397 | { |