summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibCpp/AST.h
diff options
context:
space:
mode:
Diffstat (limited to 'Userland/Libraries/LibCpp/AST.h')
-rw-r--r--Userland/Libraries/LibCpp/AST.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Userland/Libraries/LibCpp/AST.h b/Userland/Libraries/LibCpp/AST.h
index 1505ef109b..7bb7b25f35 100644
--- a/Userland/Libraries/LibCpp/AST.h
+++ b/Userland/Libraries/LibCpp/AST.h
@@ -125,8 +125,8 @@ public:
virtual bool is_function() const { return false; }
virtual bool is_namespace() const { return false; }
virtual bool is_member() const { return false; }
- const StringView& name() const { return m_name; }
- void set_name(const StringView& name) { m_name = move(name); }
+ StringView name() const { return m_name; }
+ void set_name(StringView name) { m_name = move(name); }
protected:
Declaration(ASTNode* parent, Optional<Position> start, Optional<Position> end, const String& filename)
@@ -417,7 +417,7 @@ public:
virtual bool is_identifier() const override { return true; }
- StringView const& name() const { return m_name; }
+ StringView name() const { return m_name; }
void set_name(StringView&& name) { m_name = move(name); }
private: