mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +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 <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()),
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -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"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue