From c0bcebeb08b563bf2cc42df1f3aaa51c13e5beb4 Mon Sep 17 00:00:00 2001 From: Shannon Booth Date: Thu, 14 Nov 2024 19:28:41 +1300 Subject: [PATCH] LibJS: Add const versions of Cell::visit --- Libraries/LibJS/Heap/Cell.h | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Libraries/LibJS/Heap/Cell.h b/Libraries/LibJS/Heap/Cell.h index 5da037ef279..80faba34700 100644 --- a/Libraries/LibJS/Heap/Cell.h +++ b/Libraries/LibJS/Heap/Cell.h @@ -70,6 +70,16 @@ public: visit_impl(cell); } + void visit(Cell const* cell) + { + visit(const_cast(cell)); + } + + void visit(Cell const& cell) + { + visit(const_cast(cell)); + } + template void visit(GCPtr cell) {