Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 60c2a86

Browse filesBrowse files
anonrigMylesBorins
authored andcommitted
src: use string_view instead of std::string&
PR-URL: #46471 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
1 parent f35f6d2 commit 60c2a86
Copy full SHA for 60c2a86

File tree

Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

2 files changed

+2
-2
lines changed
Open diff view settings
Collapse file

‎src/inspector/main_thread_interface.cc‎

Copy file name to clipboardExpand all lines: src/inspector/main_thread_interface.cc
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ Deletable* MainThreadInterface::GetObjectIfExists(int id) {
289289
return iterator->second.get();
290290
}
291291

292-
std::unique_ptr<StringBuffer> Utf8ToStringView(const std::string& message) {
292+
std::unique_ptr<StringBuffer> Utf8ToStringView(const std::string_view message) {
293293
size_t expected_u16_length =
294294
simdutf::utf16_length_from_utf8(message.data(), message.length());
295295
MaybeStackBuffer<char16_t> buffer(expected_u16_length);
Collapse file

‎src/inspector/main_thread_interface.h‎

Copy file name to clipboardExpand all lines: src/inspector/main_thread_interface.h
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class Deletable {
3434
};
3535

3636
std::unique_ptr<v8_inspector::StringBuffer> Utf8ToStringView(
37-
const std::string& message);
37+
const std::string_view message);
3838

3939
using MessageQueue = std::deque<std::unique_ptr<Request>>;
4040

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.