Skip to content

Commit

Permalink
LibJS: Remove DeprecatedFlyString::impl use in PrimitiveString
Browse files Browse the repository at this point in the history
  • Loading branch information
DanShaders authored and ADKaster committed Feb 24, 2024
1 parent 061f902 commit a539117
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions Userland/Libraries/LibJS/Runtime/PrimitiveString.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,7 @@ NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, ByteString string)

NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, DeprecatedFlyString const& string)
{
if (string.is_empty())
return vm.empty_string();
return create(vm, *string.impl());
return create(vm, ByteString { string });
}

NonnullGCPtr<PrimitiveString> PrimitiveString::create(VM& vm, PrimitiveString& lhs, PrimitiveString& rhs)
Expand Down

0 comments on commit a539117

Please sign in to comment.