LibJS: Use String and move semantics in Bytecode::StringTable

Avoid creating new AK::String objects when we already have one.
This commit is contained in:
Andreas Kling 2021-10-24 15:14:14 +02:00
commit 13f04e37e5
Notes: sideshowbarker 2024-07-18 01:56:44 +09:00
3 changed files with 5 additions and 5 deletions

View file

@ -21,7 +21,7 @@ class StringTable {
public:
StringTable() = default;
StringTableIndex insert(StringView string);
StringTableIndex insert(String);
String const& get(StringTableIndex) const;
void dump() const;
bool is_empty() const { return m_strings.is_empty(); }