From 8a48246ed1a93983668a25f5b9b0af0e745e3f04 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Mon, 6 Mar 2023 14:17:01 +0100 Subject: Everywhere: Stop using NonnullRefPtrVector This class had slightly confusing semantics and the added weirdness doesn't seem worth it just so we can say "." instead of "->" when iterating over a vector of NNRPs. This patch replaces NonnullRefPtrVector with Vector>. --- Userland/Shell/Formatter.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Userland/Shell/Formatter.cpp') diff --git a/Userland/Shell/Formatter.cpp b/Userland/Shell/Formatter.cpp index 3c1ac9aad3..fca5c53ea9 100644 --- a/Userland/Shell/Formatter.cpp +++ b/Userland/Shell/Formatter.cpp @@ -204,7 +204,7 @@ void Formatter::visit(const AST::BraceExpansion* node) if (!first) current_builder().append(','); first = false; - entry.visit(*this); + entry->visit(*this); } } @@ -529,7 +529,7 @@ void Formatter::visit(const AST::ImmediateExpression* node) for (auto& node : node->arguments()) { current_builder().append(' '); - node.visit(*this); + node->visit(*this); } if (node->has_closing_brace()) @@ -585,12 +585,12 @@ void Formatter::visit(const AST::MatchExpr* node) first_entry = false; auto first = true; entry.options.visit( - [&](NonnullRefPtrVector const& patterns) { + [&](Vector> const& patterns) { for (auto& option : patterns) { if (!first) current_builder().append(" | "sv); first = false; - option.visit(*this); + option->visit(*this); } }, [&](Vector> const& patterns) { @@ -721,7 +721,7 @@ void Formatter::visit(const AST::Sequence* node) else insert_separator(); - entry.visit(*this); + entry->visit(*this); } visited(node); -- cgit v1.2.3