Prefer std::move over copy

This commit is contained in:
Benjamin Bannier 2025-06-02 08:45:32 +02:00
parent 224519c11a
commit 1760d99c49
2 changed files with 3 additions and 2 deletions

View file

@ -1,5 +1,6 @@
%%{ %%{
#include <string> #include <string>
#include <utility>
#include "zeek/IPAddr.h" #include "zeek/IPAddr.h"
#include "zeek/cluster/Backend.h" #include "zeek/cluster/Backend.h"
@ -218,7 +219,7 @@ function Cluster::__listen_websocket%(options: WebSocketServerOptions%): bool
} }
struct ServerOptions server_options{ struct ServerOptions server_options{
listen_addr, std::move(listen_addr),
static_cast<uint16_t>(options_rec->GetField<zeek::PortVal>("listen_port")->Port()), static_cast<uint16_t>(options_rec->GetField<zeek::PortVal>("listen_port")->Port()),
}; };

View file

@ -134,7 +134,7 @@ std::optional<zeek::logging::detail::LogWriteBatch> detail::BinarySerializationF
fmt.EndRead(); fmt.EndRead();
return logging::detail::LogWriteBatch{header, std::move(records)}; return logging::detail::LogWriteBatch{std::move(header), std::move(records)};
} }
#include "zeek/ID.h" #include "zeek/ID.h"