summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibJS/Runtime/Accessor.h
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-03-16 18:26:49 -0600
committerLinus Groh <mail@linusgroh.de>2022-03-19 00:20:46 +0000
commita0367aa43b89b9714a86475407aef5702ae9e79d (patch)
tree5314c918b0698750b0ac1bab1948b370bbfdc363 /Userland/Libraries/LibJS/Runtime/Accessor.h
parent5b7a5b3c01007b1ba332310ed1b669bd8b4edebc (diff)
downloadserenity-a0367aa43b89b9714a86475407aef5702ae9e79d.zip
DevTools+LibJS+LibWeb: Change class_name to use StringView
This helps make the overall codebase consistent. `class_name()` in `Kernel` is always `StringView`, but not elsewhere. Additionally, this results in the `strlen` (which needs to be done when printing or other operations) always being computed at compile-time.
Diffstat (limited to 'Userland/Libraries/LibJS/Runtime/Accessor.h')
-rw-r--r--Userland/Libraries/LibJS/Runtime/Accessor.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/Userland/Libraries/LibJS/Runtime/Accessor.h b/Userland/Libraries/LibJS/Runtime/Accessor.h
index 208590a3e1..bd46a87ac8 100644
--- a/Userland/Libraries/LibJS/Runtime/Accessor.h
+++ b/Userland/Libraries/LibJS/Runtime/Accessor.h
@@ -7,6 +7,7 @@
#pragma once
+#include <AK/StringView.h>
#include <LibJS/Runtime/FunctionObject.h>
#include <LibJS/Runtime/VM.h>
@@ -38,7 +39,7 @@ public:
}
private:
- const char* class_name() const override { return "Accessor"; };
+ StringView class_name() const override { return "Accessor"sv; };
FunctionObject* m_getter { nullptr };
FunctionObject* m_setter { nullptr };