From c29681cb03078578a538fd15eeecea73ff528a6b Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 7 Aug 2020 09:41:04 +0200 Subject: [PATCH] Shell: Make VariableDeclarations::Variable store NonnullRefPtrs --- Shell/AST.h | 4 ++-- Shell/Parser.cpp | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Shell/AST.h b/Shell/AST.h index 13d97c725d..99da564861 100644 --- a/Shell/AST.h +++ b/Shell/AST.h @@ -861,8 +861,8 @@ private: class VariableDeclarations final : public Node { public: struct Variable { - RefPtr name; - RefPtr value; + NonnullRefPtr name; + NonnullRefPtr value; }; VariableDeclarations(Position, Vector variables); virtual ~VariableDeclarations(); diff --git a/Shell/Parser.cpp b/Shell/Parser.cpp index fd434162e5..d0eccb2867 100644 --- a/Shell/Parser.cpp +++ b/Shell/Parser.cpp @@ -247,7 +247,7 @@ RefPtr Parser::parse_variable_decls() } Vector variables; - variables.append({ move(name_expr), move(expression) }); + variables.append({ move(name_expr), expression.release_nonnull() }); if (consume_while(is_whitespace).is_empty()) return create(move(variables));