mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 07:18:11 +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:
parent
3117182c2e
commit
13f04e37e5
3 changed files with 5 additions and 5 deletions
|
@ -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(); }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue