1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 04:47:35 +00:00

Everywhere: Remove 'clang-format off' comments that are no longer needed

This commit is contained in:
Timothy Flynn 2023-07-07 22:59:01 -04:00 committed by Linus Groh
parent c911781c21
commit 996c020b0d
6 changed files with 42 additions and 57 deletions

View file

@ -43,20 +43,24 @@ static_assert(word_size == 32 || word_size == 64);
constexpr size_t max_big_int_length = 1 << (word_size == 32 ? 26 : 29);
// ===== Static storage for big integers =====
// FIXME: remove once Clang formats these properly.
// clang-format off
template<typename T, typename WordType = NativeWord>
concept IntegerStorage = requires(T storage, size_t index)
{
{ storage.is_negative() } -> SameAs<bool>;
{ storage.size() } -> SameAs<size_t>;
{ storage[index] } -> ConvertibleTo<WordType&>;
{ storage.data() } -> ConvertibleTo<WordType*>;
concept IntegerStorage = requires(T storage, size_t index) {
{
storage.is_negative()
} -> SameAs<bool>;
{
storage.size()
} -> SameAs<size_t>;
{
storage[index]
} -> ConvertibleTo<WordType&>;
{
storage.data()
} -> ConvertibleTo<WordType*>;
};
template<typename T>
concept IntegerReadonlyStorage = IntegerStorage<T, NativeWord const>;
// clang-format on
struct NullAllocator {
NativeWord* allocate(size_t) { VERIFY_NOT_REACHED(); }