diff options
author | Andreas Kling <kling@serenityos.org> | 2023-03-06 14:17:01 +0100 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-03-06 23:46:35 +0100 |
commit | 8a48246ed1a93983668a25f5b9b0af0e745e3f04 (patch) | |
tree | dd98425d119f79e0160bf19951f96a4a30276cbb /Userland/Shell/Formatter.cpp | |
parent | 104be6c8ace8d56f66a89b570cdd615e74d22aa8 (diff) | |
download | serenity-8a48246ed1a93983668a25f5b9b0af0e745e3f04.zip |
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<T> with Vector<NNRP<T>>.
Diffstat (limited to 'Userland/Shell/Formatter.cpp')
-rw-r--r-- | Userland/Shell/Formatter.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
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<AST::Node> const& patterns) { + [&](Vector<NonnullRefPtr<AST::Node>> const& patterns) { for (auto& option : patterns) { if (!first) current_builder().append(" | "sv); first = false; - option.visit(*this); + option->visit(*this); } }, [&](Vector<Regex<ECMA262>> const& patterns) { @@ -721,7 +721,7 @@ void Formatter::visit(const AST::Sequence* node) else insert_separator(); - entry.visit(*this); + entry->visit(*this); } visited(node); |