clang-tidy: modernize-pass-by-value

This commit is contained in:
Peter Johnson
2020-12-28 10:12:52 -08:00
parent 29c7da5f1a
commit aee4603269
32 changed files with 158 additions and 107 deletions

View File

@@ -4,11 +4,12 @@
#include "WSBaseProvider.h"
#include <utility>
namespace wpilibws {
HALSimWSBaseProvider::HALSimWSBaseProvider(const std::string& key,
const std::string& type)
: m_key(key), m_type(type) {}
HALSimWSBaseProvider::HALSimWSBaseProvider(std::string key, std::string type)
: m_key(std::move(key)), m_type(std::move(type)) {}
void HALSimWSBaseProvider::OnNetValueChanged(const wpi::json& json) {
// empty

View File

@@ -16,8 +16,7 @@ namespace wpilibws {
class HALSimWSBaseProvider {
public:
explicit HALSimWSBaseProvider(const std::string& key,
const std::string& type = "");
explicit HALSimWSBaseProvider(std::string key, std::string type = "");
virtual ~HALSimWSBaseProvider() = default;
HALSimWSBaseProvider(const HALSimWSBaseProvider&) = delete;