Skip to content

Commit

Permalink
Remove unnecessary Vector copy in mapHostName
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=271440

Reviewed by Sihui Liu.

* Source/WTF/wtf/URLHelpers.cpp:
(WTF::URLHelpers::mapHostName):

Canonical link: https://commits.webkit.org/276638@main
  • Loading branch information
achristensen07 committed Mar 25, 2024
1 parent 1dff3b6 commit 0720154
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Source/WTF/wtf/URLHelpers.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -651,7 +651,7 @@ std::optional<String> mapHostName(const String& hostName, URLDecodeFunction deco
auto expectedSourceBuffer = string.charactersWithNullTermination();
if (!expectedSourceBuffer)
return std::nullopt;
auto sourceBuffer = expectedSourceBuffer.value();
auto sourceBuffer = expectedSourceBuffer->span();

UChar destinationBuffer[URLParser::hostnameBufferLength];
UErrorCode uerror = U_ZERO_ERROR;
Expand Down

0 comments on commit 0720154

Please sign in to comment.