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

Everywhere: Run clang-format

This commit is contained in:
Idan Horowitz 2022-04-01 20:58:27 +03:00 committed by Linus Groh
parent 0376c127f6
commit 086969277e
1665 changed files with 8479 additions and 8479 deletions

View file

@ -25,7 +25,7 @@ public:
~HandleImpl();
Cell* cell() { return m_cell; }
const Cell* cell() const { return m_cell; }
Cell const* cell() const { return m_cell; }
private:
template<class T>

View file

@ -156,15 +156,15 @@ __attribute__((no_sanitize("address"))) void Heap::gather_conservative_roots(Has
for (auto possible_pointer : possible_pointers) {
if (!possible_pointer)
continue;
dbgln_if(HEAP_DEBUG, " ? {}", (const void*)possible_pointer);
auto* possible_heap_block = HeapBlock::from_cell(reinterpret_cast<const Cell*>(possible_pointer));
dbgln_if(HEAP_DEBUG, " ? {}", (void const*)possible_pointer);
auto* possible_heap_block = HeapBlock::from_cell(reinterpret_cast<Cell const*>(possible_pointer));
if (all_live_heap_blocks.contains(possible_heap_block)) {
if (auto* cell = possible_heap_block->cell_from_possible_pointer(possible_pointer)) {
if (cell->state() == Cell::State::Live) {
dbgln_if(HEAP_DEBUG, " ?-> {}", (const void*)cell);
dbgln_if(HEAP_DEBUG, " ?-> {}", (void const*)cell);
roots.set(cell);
} else {
dbgln_if(HEAP_DEBUG, " #-> {}", (const void*)cell);
dbgln_if(HEAP_DEBUG, " #-> {}", (void const*)cell);
}
}
}
@ -186,7 +186,7 @@ public:
}
};
void Heap::mark_live_cells(const HashTable<Cell*>& roots)
void Heap::mark_live_cells(HashTable<Cell*> const& roots)
{
dbgln_if(HEAP_DEBUG, "mark_live_cells:");
@ -200,7 +200,7 @@ void Heap::mark_live_cells(const HashTable<Cell*>& roots)
m_uprooted_cells.clear();
}
void Heap::sweep_dead_cells(bool print_report, const Core::ElapsedTimer& measurement_timer)
void Heap::sweep_dead_cells(bool print_report, Core::ElapsedTimer const& measurement_timer)
{
dbgln_if(HEAP_DEBUG, "sweep_dead_cells:");
Vector<HeapBlock*, 32> empty_blocks;

View file

@ -84,8 +84,8 @@ private:
void gather_roots(HashTable<Cell*>&);
void gather_conservative_roots(HashTable<Cell*>&);
void mark_live_cells(const HashTable<Cell*>& live_cells);
void sweep_dead_cells(bool print_report, const Core::ElapsedTimer&);
void mark_live_cells(HashTable<Cell*> const& live_cells);
void sweep_dead_cells(bool print_report, Core::ElapsedTimer const&);
CellAllocator& allocator_for_size(size_t);

View file

@ -68,7 +68,7 @@ public:
Heap& heap() { return m_heap; }
static HeapBlock* from_cell(const Cell* cell)
static HeapBlock* from_cell(Cell const* cell)
{
return reinterpret_cast<HeapBlock*>((FlatPtr)cell & ~(block_size - 1));
}
@ -84,7 +84,7 @@ public:
return cell(cell_index);
}
bool is_valid_cell_pointer(const Cell* cell)
bool is_valid_cell_pointer(Cell const* cell)
{
return cell_from_possible_pointer((FlatPtr)cell);
}