mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
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>>.
This commit is contained in:
parent
104be6c8ac
commit
8a48246ed1
168 changed files with 1280 additions and 1280 deletions
|
@ -38,7 +38,7 @@ void NodeVisitor::visit(const AST::BarewordLiteral*)
|
|||
void NodeVisitor::visit(const AST::BraceExpansion* node)
|
||||
{
|
||||
for (auto& entry : node->entries())
|
||||
entry.visit(*this);
|
||||
entry->visit(*this);
|
||||
}
|
||||
|
||||
void NodeVisitor::visit(const AST::CastToCommand* node)
|
||||
|
@ -128,7 +128,7 @@ void NodeVisitor::visit(const AST::IfCond* node)
|
|||
void NodeVisitor::visit(const AST::ImmediateExpression* node)
|
||||
{
|
||||
for (auto& node : node->arguments())
|
||||
node.visit(*this);
|
||||
node->visit(*this);
|
||||
}
|
||||
|
||||
void NodeVisitor::visit(const AST::Join* node)
|
||||
|
@ -141,9 +141,9 @@ void NodeVisitor::visit(const AST::MatchExpr* node)
|
|||
{
|
||||
node->matched_expr()->visit(*this);
|
||||
for (auto& entry : node->entries()) {
|
||||
if (auto* ptr = entry.options.get_pointer<NonnullRefPtrVector<Node>>()) {
|
||||
if (auto* ptr = entry.options.get_pointer<Vector<NonnullRefPtr<Node>>>()) {
|
||||
for (auto& option : *ptr)
|
||||
option.visit(*this);
|
||||
option->visit(*this);
|
||||
}
|
||||
if (entry.body)
|
||||
entry.body->visit(*this);
|
||||
|
@ -181,7 +181,7 @@ void NodeVisitor::visit(const AST::ReadWriteRedirection* node)
|
|||
void NodeVisitor::visit(const AST::Sequence* node)
|
||||
{
|
||||
for (auto& entry : node->entries())
|
||||
entry.visit(*this);
|
||||
entry->visit(*this);
|
||||
}
|
||||
|
||||
void NodeVisitor::visit(const AST::Subshell* node)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue