1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:17:44 +00:00

Kernel: Run clang-format on everything.

This commit is contained in:
Andreas Kling 2019-06-07 11:43:58 +02:00
parent 98eeb8f22d
commit bc951ca565
63 changed files with 974 additions and 856 deletions

View file

@ -1,6 +1,6 @@
#include <AK/QuickSort.h>
#include <Kernel/VM/RangeAllocator.h>
#include <Kernel/kstdio.h>
#include <AK/QuickSort.h>
//#define VRA_DEBUG
@ -33,7 +33,7 @@ Vector<Range, 2> Range::carve(const Range& taken)
{
Vector<Range, 2> parts;
if (taken == *this)
return { };
return {};
if (taken.base() > base())
parts.append({ base(), taken.base().get() - base().get() });
if (taken.end() < end())
@ -79,7 +79,7 @@ Range RangeAllocator::allocate_anywhere(size_t size)
return allocated_range;
}
kprintf("VRA: Failed to allocate anywhere: %u\n", size);
return { };
return {};
}
Range RangeAllocator::allocate_specific(LinearAddress base, size_t size)
@ -101,7 +101,7 @@ Range RangeAllocator::allocate_specific(LinearAddress base, size_t size)
return allocated_range;
}
kprintf("VRA: Failed to allocate specific range: %x(%u)\n", base.get(), size);
return { };
return {};
}
void RangeAllocator::deallocate(Range range)
@ -121,7 +121,7 @@ void RangeAllocator::deallocate(Range range)
sort_and_merge:
// FIXME: We don't have to sort if we insert at the right position immediately.
quick_sort(m_available_ranges.begin(), m_available_ranges.end(), [] (auto& a, auto& b) {
quick_sort(m_available_ranges.begin(), m_available_ranges.end(), [](auto& a, auto& b) {
return a.base() < b.base();
});