mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-02 02:51:42 +00:00
clang-tidy: modernize-use-override (NFC)
Add NOLINT to CommandTestBase due to gmock not adding "override" keyword, which causes warnings on clang.
This commit is contained in:
@@ -49,7 +49,7 @@ class ProxyScheduleCommand;
|
||||
class Command : public frc::ErrorBase {
|
||||
public:
|
||||
Command() = default;
|
||||
virtual ~Command();
|
||||
~Command() override;
|
||||
|
||||
Command(const Command&);
|
||||
Command& operator=(const Command&);
|
||||
|
||||
@@ -39,7 +39,7 @@ class CommandScheduler final : public frc::Sendable,
|
||||
*/
|
||||
static CommandScheduler& GetInstance();
|
||||
|
||||
~CommandScheduler();
|
||||
~CommandScheduler() override;
|
||||
CommandScheduler(const CommandScheduler&) = delete;
|
||||
CommandScheduler& operator=(const CommandScheduler&) = delete;
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class RunCommand : public CommandHelper<CommandBase, RunCommand> {
|
||||
|
||||
RunCommand(const RunCommand& other) = default;
|
||||
|
||||
void Execute();
|
||||
void Execute() override;
|
||||
|
||||
protected:
|
||||
std::function<void()> m_toRun;
|
||||
|
||||
@@ -72,13 +72,13 @@ class CommandTestBase : public ::testing::Test {
|
||||
.WillRepeatedly(::testing::Return(finished));
|
||||
}
|
||||
|
||||
~MockCommand() {
|
||||
~MockCommand() { // NOLINT
|
||||
auto& scheduler = CommandScheduler::GetInstance();
|
||||
scheduler.Cancel(this);
|
||||
}
|
||||
|
||||
protected:
|
||||
std::unique_ptr<Command> TransferOwnership() && {
|
||||
std::unique_ptr<Command> TransferOwnership() && { // NOLINT
|
||||
return std::make_unique<MockCommand>(std::move(*this));
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user