mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 12:49:08 +00:00
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:
@@ -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(); }
|
||||
|
||||
Reference in New Issue
Block a user