From 37128612c03c55c78fcf9b2cb4c0a22aa5f45e52 Mon Sep 17 00:00:00 2001 From: Yagiz Nizipli Date: Thu, 2 Feb 2023 12:53:20 -0500 Subject: [PATCH] src: use string_view instead of std::string& --- src/inspector/main_thread_interface.cc | 2 +- src/inspector/main_thread_interface.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inspector/main_thread_interface.cc b/src/inspector/main_thread_interface.cc index a1622433301989..50a4bec3fd6c41 100644 --- a/src/inspector/main_thread_interface.cc +++ b/src/inspector/main_thread_interface.cc @@ -289,7 +289,7 @@ Deletable* MainThreadInterface::GetObjectIfExists(int id) { return iterator->second.get(); } -std::unique_ptr Utf8ToStringView(const std::string& message) { +std::unique_ptr Utf8ToStringView(const std::string_view message) { size_t expected_u16_length = simdutf::utf16_length_from_utf8(message.data(), message.length()); char16_t buffer[expected_u16_length]; diff --git a/src/inspector/main_thread_interface.h b/src/inspector/main_thread_interface.h index 3ec5b3db3e1600..71989db3bcacb9 100644 --- a/src/inspector/main_thread_interface.h +++ b/src/inspector/main_thread_interface.h @@ -34,7 +34,7 @@ class Deletable { }; std::unique_ptr Utf8ToStringView( - const std::string& message); + const std::string_view message); using MessageQueue = std::deque>;