diff options
author | Andreas Kling <kling@serenityos.org> | 2021-04-23 16:46:57 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-04-23 16:46:57 +0200 |
commit | b91c49364df1683c7fe1191eb02b8d9c331874f6 (patch) | |
tree | a9ea5ff8e4cc8cfcfe75c279551be35793d0ffb3 /Userland/Libraries/LibCpp | |
parent | b3db01e20eeae632cc75df9af8666772bda67091 (diff) | |
download | serenity-b91c49364df1683c7fe1191eb02b8d9c331874f6.zip |
AK: Rename adopt() to adopt_ref()
This makes it more symmetrical with adopt_own() (which is used to
create a NonnullOwnPtr from the result of a naked new.)
Diffstat (limited to 'Userland/Libraries/LibCpp')
-rw-r--r-- | Userland/Libraries/LibCpp/Parser.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibCpp/Parser.h b/Userland/Libraries/LibCpp/Parser.h index 085d4edcdb..90107c398d 100644 --- a/Userland/Libraries/LibCpp/Parser.h +++ b/Userland/Libraries/LibCpp/Parser.h @@ -139,7 +139,7 @@ private: NonnullRefPtr<T> create_ast_node(ASTNode& parent, const Position& start, Optional<Position> end, Args&&... args) { - auto node = adopt(*new T(&parent, start, end, m_filename, forward<Args>(args)...)); + auto node = adopt_ref(*new T(&parent, start, end, m_filename, forward<Args>(args)...)); if (!parent.is_dummy_node()) { m_state.nodes.append(node); } @@ -149,7 +149,7 @@ private: NonnullRefPtr<TranslationUnit> create_root_ast_node(const Position& start, Position end) { - auto node = adopt(*new TranslationUnit(nullptr, start, end, m_filename)); + auto node = adopt_ref(*new TranslationUnit(nullptr, start, end, m_filename)); m_state.nodes.append(node); m_root_node = node; return node; @@ -157,7 +157,7 @@ private: DummyAstNode& get_dummy_node() { - static NonnullRefPtr<DummyAstNode> dummy = adopt(*new DummyAstNode(nullptr, {}, {}, {})); + static NonnullRefPtr<DummyAstNode> dummy = adopt_ref(*new DummyAstNode(nullptr, {}, {}, {})); return dummy; } |