mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +00:00
clang-tidy: modernize-pass-by-value
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
#include "NetworkConnection.h"
|
||||
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/NetworkStream.h>
|
||||
#include <wpi/raw_socket_istream.h>
|
||||
#include <wpi/timestamp.h>
|
||||
@@ -25,8 +27,8 @@ NetworkConnection::NetworkConnection(unsigned int uid,
|
||||
m_stream(std::move(stream)),
|
||||
m_notifier(notifier),
|
||||
m_logger(logger),
|
||||
m_handshake(handshake),
|
||||
m_get_entry_type(get_entry_type),
|
||||
m_handshake(std::move(handshake)),
|
||||
m_get_entry_type(std::move(get_entry_type)),
|
||||
m_state(kCreated) {
|
||||
m_active = false;
|
||||
m_proto_rev = 0x0300;
|
||||
|
||||
@@ -26,7 +26,7 @@ struct RpcNotifierData : public RpcAnswer {
|
||||
StringRef params_, const ConnectionInfo& conn_,
|
||||
IRpcServer::SendResponseFunc send_response_)
|
||||
: RpcAnswer{entry_, call_, name_, params_, conn_},
|
||||
send_response{send_response_} {}
|
||||
send_response{std::move(send_response_)} {}
|
||||
|
||||
IRpcServer::SendResponseFunc send_response;
|
||||
};
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <cctype>
|
||||
#include <string>
|
||||
#include <utility>
|
||||
|
||||
#include <wpi/Base64.h>
|
||||
#include <wpi/SmallString.h>
|
||||
@@ -24,7 +25,7 @@ class LoadPersistentImpl {
|
||||
using WarnFunc = std::function<void(size_t, const char*)>;
|
||||
|
||||
LoadPersistentImpl(wpi::raw_istream& is, WarnFunc warn)
|
||||
: m_is(is), m_warn(warn) {}
|
||||
: m_is(is), m_warn(std::move(warn)) {}
|
||||
|
||||
bool Load(StringRef prefix, std::vector<Entry>* entries);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user