| Index: third_party/WebKit/Source/wtf/BitArray.h
|
| diff --git a/third_party/WebKit/Source/wtf/BitArray.h b/third_party/WebKit/Source/wtf/BitArray.h
|
| index 76258b337159938b1b34c1d57248df89f597dab2..9eb58a9955d83dc9b997cda0b42dabc28b01d40b 100644
|
| --- a/third_party/WebKit/Source/wtf/BitArray.h
|
| +++ b/third_party/WebKit/Source/wtf/BitArray.h
|
| @@ -32,39 +32,36 @@
|
|
|
| namespace WTF {
|
|
|
| -template<unsigned arraySize>
|
| +template <unsigned arraySize>
|
| class BitArray {
|
| - USING_FAST_MALLOC(BitArray);
|
| -public:
|
| - BitArray(bool value = false)
|
| - {
|
| - memset(m_data, value ? 0xFF : 0, sizeof(m_data));
|
| - }
|
| + USING_FAST_MALLOC(BitArray);
|
|
|
| - void set(unsigned index)
|
| - {
|
| - ASSERT_WITH_SECURITY_IMPLICATION(index < arraySize);
|
| - m_data[index / 8] |= 1 << (index & 7);
|
| - }
|
| + public:
|
| + BitArray(bool value = false) {
|
| + memset(m_data, value ? 0xFF : 0, sizeof(m_data));
|
| + }
|
|
|
| - void clear(unsigned index)
|
| - {
|
| - ASSERT_WITH_SECURITY_IMPLICATION(index < arraySize);
|
| - m_data[index / 8] &= ~(1 << (index & 7));
|
| - }
|
| + void set(unsigned index) {
|
| + ASSERT_WITH_SECURITY_IMPLICATION(index < arraySize);
|
| + m_data[index / 8] |= 1 << (index & 7);
|
| + }
|
|
|
| - bool get(unsigned index) const
|
| - {
|
| - ASSERT_WITH_SECURITY_IMPLICATION(index < arraySize);
|
| - return !!(m_data[index / 8] & (1 << (index & 7)));
|
| - }
|
| + void clear(unsigned index) {
|
| + ASSERT_WITH_SECURITY_IMPLICATION(index < arraySize);
|
| + m_data[index / 8] &= ~(1 << (index & 7));
|
| + }
|
|
|
| -private:
|
| - unsigned char m_data[arraySize / 8 + 1];
|
| + bool get(unsigned index) const {
|
| + ASSERT_WITH_SECURITY_IMPLICATION(index < arraySize);
|
| + return !!(m_data[index / 8] & (1 << (index & 7)));
|
| + }
|
| +
|
| + private:
|
| + unsigned char m_data[arraySize / 8 + 1];
|
| };
|
|
|
| -} // namespace WTF
|
| +} // namespace WTF
|
|
|
| using WTF::BitArray;
|
|
|
| -#endif // BitArray_h
|
| +#endif // BitArray_h
|
|
|