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

@@ -5,6 +5,7 @@
#include "frc/Watchdog.h"
#include <atomic>
#include <utility>
#include <hal/Notifier.h>
#include <wpi/Format.h>
@@ -137,7 +138,7 @@ Watchdog::Watchdog(double timeout, std::function<void()> callback)
: Watchdog(units::second_t{timeout}, callback) {}
Watchdog::Watchdog(units::second_t timeout, std::function<void()> callback)
: m_timeout(timeout), m_callback(callback), m_impl(GetImpl()) {}
: m_timeout(timeout), m_callback(std::move(callback)), m_impl(GetImpl()) {}
Watchdog::~Watchdog() {
Disable();