diff options
author | Andreas Kling <kling@serenityos.org> | 2021-06-12 13:24:45 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-06-12 13:24:45 +0200 |
commit | dc65f54c065364225f0113a9339af72735547779 (patch) | |
tree | 60a8b9d37c6236748bfa310a564150d688595183 /Userland/Libraries/LibCpp/AST.cpp | |
parent | 7e1bffdeb85c832c7cea1a71e2c9e9ebe7ff96ae (diff) | |
download | serenity-dc65f54c065364225f0113a9339af72735547779.zip |
AK: Rename Vector::append(Vector) => Vector::extend(Vector)
Let's make it a bit more clear when we're appending the elements from
one vector to the end of another vector.
Diffstat (limited to 'Userland/Libraries/LibCpp/AST.cpp')
-rw-r--r-- | Userland/Libraries/LibCpp/AST.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Userland/Libraries/LibCpp/AST.cpp b/Userland/Libraries/LibCpp/AST.cpp index 1428c2624b..69fc15a0e4 100644 --- a/Userland/Libraries/LibCpp/AST.cpp +++ b/Userland/Libraries/LibCpp/AST.cpp @@ -63,7 +63,7 @@ NonnullRefPtrVector<Declaration> FunctionDeclaration::declarations() const } if (m_definition) - declarations.append(m_definition->declarations()); + declarations.extend(m_definition->declarations()); return declarations; } @@ -131,7 +131,7 @@ NonnullRefPtrVector<Declaration> FunctionDefinition::declarations() const { NonnullRefPtrVector<Declaration> declarations; for (auto& statement : m_statements) { - declarations.append(statement.declarations()); + declarations.extend(statement.declarations()); } return declarations; } @@ -400,9 +400,9 @@ NonnullRefPtrVector<Declaration> ForStatement::declarations() const { NonnullRefPtrVector<Declaration> declarations; if (m_init) - declarations.append(m_init->declarations()); + declarations.extend(m_init->declarations()); if (m_body) - declarations.append(m_body->declarations()); + declarations.extend(m_body->declarations()); return declarations; } @@ -410,7 +410,7 @@ NonnullRefPtrVector<Declaration> BlockStatement::declarations() const { NonnullRefPtrVector<Declaration> declarations; for (auto& statement : m_statements) { - declarations.append(statement.declarations()); + declarations.extend(statement.declarations()); } return declarations; } @@ -439,11 +439,11 @@ NonnullRefPtrVector<Declaration> IfStatement::declarations() const { NonnullRefPtrVector<Declaration> declarations; if (m_predicate) - declarations.append(m_predicate->declarations()); + declarations.extend(m_predicate->declarations()); if (m_then) - declarations.append(m_then->declarations()); + declarations.extend(m_then->declarations()); if (m_else) - declarations.append(m_else->declarations()); + declarations.extend(m_else->declarations()); return declarations; } |