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:
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <utility>
|
||||
|
||||
#include "Message.h"
|
||||
#include "TestPrinters.h"
|
||||
@@ -18,7 +19,7 @@ class MessageMatcher
|
||||
: public ::testing::MatcherInterface<std::shared_ptr<Message>> {
|
||||
public:
|
||||
explicit MessageMatcher(std::shared_ptr<Message> goodmsg_)
|
||||
: goodmsg(goodmsg_) {}
|
||||
: goodmsg(std::move(goodmsg_)) {}
|
||||
|
||||
bool MatchAndExplain(std::shared_ptr<Message> msg,
|
||||
::testing::MatchResultListener* listener) const override;
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
|
||||
#include <memory>
|
||||
#include <ostream>
|
||||
#include <utility>
|
||||
|
||||
#include "gmock/gmock.h"
|
||||
#include "networktables/NetworkTableValue.h"
|
||||
@@ -16,7 +17,8 @@ namespace nt {
|
||||
class ValueMatcher
|
||||
: public ::testing::MatcherInterface<std::shared_ptr<Value>> {
|
||||
public:
|
||||
explicit ValueMatcher(std::shared_ptr<Value> goodval_) : goodval(goodval_) {}
|
||||
explicit ValueMatcher(std::shared_ptr<Value> goodval_)
|
||||
: goodval(std::move(goodval_)) {}
|
||||
|
||||
bool MatchAndExplain(std::shared_ptr<Value> msg,
|
||||
::testing::MatchResultListener* listener) const override;
|
||||
|
||||
Reference in New Issue
Block a user