Clang format

This commit is contained in:
Matthew Parkinson
2019-01-22 17:18:54 +00:00
parent cb70aa3f7f
commit 745a2a53d1
3 changed files with 13 additions and 13 deletions

View File

@@ -32,21 +32,21 @@ namespace snmalloc
}
};
template <size_t length, typename T>
template<size_t length, typename T>
class ModArray
{
static constexpr size_t rlength = bits::next_pow2_const(length);
T array[rlength];
public:
constexpr const T &operator[] (const size_t i) const
{
return array[i & (rlength - 1)];
}
constexpr T &operator[] (const size_t i)
public:
constexpr const T& operator[](const size_t i) const
{
return array[i & (rlength - 1)];
}
}
constexpr T& operator[](const size_t i)
{
return array[i & (rlength - 1)];
}
};
}