std::string_view 的使用

This commit is contained in:
2026-06-29 09:40:55 +08:00
parent ccf7eecc29
commit c25e58ae17
40 changed files with 532 additions and 522 deletions
+2 -1
View File
@@ -1,4 +1,5 @@
#include "UDP_Client.h"
#include <string_view>
namespace Psc::asio_socket {
@@ -85,7 +86,7 @@ void UDP_Client::tick() {
}
}
void UDP_Client::send(const std::string &data) {
void UDP_Client::send(std::string_view data) {
if (data.empty())
return;
send_buffer.write(data.data(), data.size());