set buffer Skip the copy when m_bytes == 0 -- after clear() that path leaves m_vector == NULL, and memcpy(NULL, src, 0) is C-standard UB even on real libcs that no-op it. Matches SetAllTrue() above.
| 145 | // m_vector == NULL, and memcpy(NULL, src, 0) is C-standard UB even |
| 146 | // on real libcs that no-op it. Matches SetAllTrue() above. |
| 147 | void SetBuffer(const void* src) { if (m_bytes) { memcpy(m_vector, src, m_bytes); } m_allTrue = 2; } |
| 148 | |
| 149 | private: |
| 150 | uint32 m_bits; // number of bits |