From aaed751bf4430bf4b9b30cef532b8753b9f639ce Mon Sep 17 00:00:00 2001 From: untodesu Date: Thu, 11 Sep 2025 13:48:31 +0500 Subject: Replace most of C strings with string_view --- game/client/gui/bother.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'game/client/gui/bother.cc') diff --git a/game/client/gui/bother.cc b/game/client/gui/bother.cc index 3a35438..d87f220 100644 --- a/game/client/gui/bother.cc +++ b/game/client/gui/bother.cc @@ -117,7 +117,7 @@ void gui::bother::update_late(void) } } -void gui::bother::ping(unsigned int identity, const char* host, std::uint16_t port) +void gui::bother::ping(unsigned int identity, std::string_view host, std::uint16_t port) { if(bother_set.count(identity)) { // Already in the process @@ -133,7 +133,7 @@ void gui::bother::ping(unsigned int identity, const char* host, std::uint16_t po BotherQueueItem item; item.identity = identity; - item.hostname = std::string(host); + item.hostname = host; item.port = port; bother_queue.push_back(item); -- cgit