mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Prefer std::move
over copy
This commit is contained in:
parent
224519c11a
commit
1760d99c49
2 changed files with 3 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
%%{
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include "zeek/IPAddr.h"
|
||||
#include "zeek/cluster/Backend.h"
|
||||
|
@ -218,7 +219,7 @@ function Cluster::__listen_websocket%(options: WebSocketServerOptions%): bool
|
|||
}
|
||||
|
||||
struct ServerOptions server_options{
|
||||
listen_addr,
|
||||
std::move(listen_addr),
|
||||
static_cast<uint16_t>(options_rec->GetField<zeek::PortVal>("listen_port")->Port()),
|
||||
};
|
||||
|
||||
|
|
|
@ -134,7 +134,7 @@ std::optional<zeek::logging::detail::LogWriteBatch> detail::BinarySerializationF
|
|||
|
||||
fmt.EndRead();
|
||||
|
||||
return logging::detail::LogWriteBatch{header, std::move(records)};
|
||||
return logging::detail::LogWriteBatch{std::move(header), std::move(records)};
|
||||
}
|
||||
|
||||
#include "zeek/ID.h"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue