mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +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:
@@ -75,7 +75,7 @@ class MjpegServerImpl::ConnThread : public wpi::SafeThread {
|
||||
explicit ConnThread(const wpi::Twine& name, wpi::Logger& logger)
|
||||
: m_name(name.str()), m_logger(logger) {}
|
||||
|
||||
void Main();
|
||||
void Main() override;
|
||||
|
||||
bool ProcessCommand(wpi::raw_ostream& os, SourceImpl& source,
|
||||
wpi::StringRef parameters, bool respond);
|
||||
|
||||
@@ -68,7 +68,7 @@ class Notifier::Thread : public wpi::SafeThread {
|
||||
Thread(std::function<void()> on_start, std::function<void()> on_exit)
|
||||
: m_on_start(on_start), m_on_exit(on_exit) {}
|
||||
|
||||
void Main();
|
||||
void Main() override;
|
||||
|
||||
struct Listener {
|
||||
Listener() = default;
|
||||
|
||||
@@ -29,7 +29,7 @@ class SinkImpl : public PropertyContainer {
|
||||
public:
|
||||
explicit SinkImpl(const wpi::Twine& name, wpi::Logger& logger,
|
||||
Notifier& notifier, Telemetry& telemetry);
|
||||
virtual ~SinkImpl();
|
||||
~SinkImpl() override;
|
||||
SinkImpl(const SinkImpl& queue) = delete;
|
||||
SinkImpl& operator=(const SinkImpl& queue) = delete;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class SourceImpl : public PropertyContainer {
|
||||
public:
|
||||
SourceImpl(const wpi::Twine& name, wpi::Logger& logger, Notifier& notifier,
|
||||
Telemetry& telemetry);
|
||||
virtual ~SourceImpl();
|
||||
~SourceImpl() override;
|
||||
SourceImpl(const SourceImpl& oth) = delete;
|
||||
SourceImpl& operator=(const SourceImpl& oth) = delete;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ class Telemetry::Thread : public wpi::SafeThread {
|
||||
public:
|
||||
explicit Thread(Notifier& notifier) : m_notifier(notifier) {}
|
||||
|
||||
void Main();
|
||||
void Main() override;
|
||||
|
||||
Notifier& m_notifier;
|
||||
wpi::DenseMap<std::pair<CS_Handle, int>, int64_t> m_user;
|
||||
|
||||
@@ -34,7 +34,7 @@ class NetworkListener::Impl {
|
||||
public:
|
||||
Thread(wpi::Logger& logger, Notifier& notifier)
|
||||
: m_logger(logger), m_notifier(notifier) {}
|
||||
void Main();
|
||||
void Main() override;
|
||||
|
||||
wpi::Logger& m_logger;
|
||||
Notifier& m_notifier;
|
||||
|
||||
@@ -24,7 +24,7 @@ namespace {
|
||||
// Safe thread to allow callbacks to run on their own thread
|
||||
class InterruptThread : public wpi::SafeThread {
|
||||
public:
|
||||
void Main() {
|
||||
void Main() override {
|
||||
std::unique_lock lock(m_mutex);
|
||||
while (m_active) {
|
||||
m_cond.wait(lock, [&] { return !m_active || m_notify; });
|
||||
|
||||
@@ -31,7 +31,7 @@ using namespace hal;
|
||||
// process, we will just ignore the redundant wakeup.
|
||||
class InterruptThreadJNI : public wpi::SafeThread {
|
||||
public:
|
||||
void Main();
|
||||
void Main() override;
|
||||
|
||||
bool m_notify = false;
|
||||
uint32_t m_mask = 0;
|
||||
|
||||
@@ -49,7 +49,7 @@ class IndexedClassedHandleResource : public HandleBase {
|
||||
}
|
||||
std::shared_ptr<TStruct> Get(THandle handle);
|
||||
void Free(THandle handle);
|
||||
void ResetHandles();
|
||||
void ResetHandles() override;
|
||||
|
||||
private:
|
||||
std::array<std::shared_ptr<TStruct>, size> m_structures;
|
||||
|
||||
@@ -54,7 +54,7 @@ class CallbackThread : public wpi::SafeThread {
|
||||
using NotifierData = TNotifierData;
|
||||
using ListenerData = TListenerData;
|
||||
|
||||
~CallbackThread() {
|
||||
~CallbackThread() override {
|
||||
// Wake up any blocked pollers
|
||||
for (size_t i = 0; i < m_pollers.size(); ++i) {
|
||||
if (auto poller = m_pollers[i]) {
|
||||
|
||||
@@ -41,7 +41,7 @@ class DispatcherBase : public IDispatcher {
|
||||
|
||||
DispatcherBase(IStorage& storage, IConnectionNotifier& notifier,
|
||||
wpi::Logger& logger);
|
||||
virtual ~DispatcherBase();
|
||||
~DispatcherBase() override;
|
||||
|
||||
unsigned int GetNetworkMode() const;
|
||||
void StartLocal();
|
||||
|
||||
@@ -19,7 +19,7 @@ class DsClient::Thread : public wpi::SafeThread {
|
||||
Thread(Dispatcher& dispatcher, wpi::Logger& logger, unsigned int port)
|
||||
: m_dispatcher(dispatcher), m_logger(logger), m_port(port) {}
|
||||
|
||||
void Main();
|
||||
void Main() override;
|
||||
|
||||
Dispatcher& m_dispatcher;
|
||||
wpi::Logger& m_logger;
|
||||
|
||||
@@ -49,7 +49,7 @@ class NetworkConnection : public INetworkConnection {
|
||||
IConnectionNotifier& notifier, wpi::Logger& logger,
|
||||
HandshakeFunc handshake,
|
||||
Message::GetEntryTypeFunc get_entry_type);
|
||||
~NetworkConnection();
|
||||
~NetworkConnection() override;
|
||||
|
||||
// Set the input processor function. This must be called before Start().
|
||||
void set_process_incoming(ProcessIncomingFunc func) {
|
||||
|
||||
@@ -47,7 +47,7 @@ class Storage : public IStorage {
|
||||
Storage(const Storage&) = delete;
|
||||
Storage& operator=(const Storage&) = delete;
|
||||
|
||||
~Storage();
|
||||
~Storage() override;
|
||||
|
||||
// Accessors required by Dispatcher. An interface is used for
|
||||
// generation of outgoing messages to break a dependency loop between
|
||||
|
||||
@@ -56,7 +56,7 @@ class EncoderSimModel : public glass::EncoderModel {
|
||||
: EncoderSimModel(index, HALSIM_GetEncoderDigitalChannelA(index),
|
||||
HALSIM_GetEncoderDigitalChannelB(index)) {}
|
||||
|
||||
~EncoderSimModel() {
|
||||
~EncoderSimModel() override {
|
||||
if (m_distancePerPulseCallback != 0) {
|
||||
HALSIM_CancelEncoderDistancePerPulseCallback(m_index,
|
||||
m_distancePerPulseCallback);
|
||||
|
||||
@@ -24,7 +24,7 @@ class SimValueSource : public glass::DataSource {
|
||||
: DataSource(wpi::Twine{device} + wpi::Twine{'-'} + name),
|
||||
m_callback{HALSIM_RegisterSimValueChangedCallback(
|
||||
handle, this, CallbackFunc, true)} {}
|
||||
~SimValueSource() {
|
||||
~SimValueSource() override {
|
||||
if (m_callback != 0) {
|
||||
HALSIM_CancelSimValueChangedCallback(m_callback);
|
||||
}
|
||||
|
||||
@@ -27,8 +27,9 @@ class HALSimWSHalProvider : public HALSimWSBaseProvider {
|
||||
public:
|
||||
using HALSimWSBaseProvider::HALSimWSBaseProvider;
|
||||
|
||||
void OnNetworkConnected(std::shared_ptr<HALSimBaseWebSocketConnection> ws);
|
||||
void OnNetworkDisconnected();
|
||||
void OnNetworkConnected(
|
||||
std::shared_ptr<HALSimBaseWebSocketConnection> ws) override;
|
||||
void OnNetworkDisconnected() override;
|
||||
|
||||
void ProcessHalCallback(const wpi::json& payload);
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class HALSimWSProviderAnalogIn : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderAnalogIn();
|
||||
~HALSimWSProviderAnalogIn() override;
|
||||
|
||||
void OnNetValueChanged(const wpi::json& json) override;
|
||||
|
||||
@@ -41,7 +41,7 @@ class HALSimWSProviderAnalogOut : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderAnalogOut();
|
||||
~HALSimWSProviderAnalogOut() override;
|
||||
|
||||
protected:
|
||||
void RegisterCallbacks() override;
|
||||
|
||||
@@ -13,7 +13,7 @@ class HALSimWSProviderBuiltInAccelerometer : public HALSimWSHalProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalProvider::HALSimWSHalProvider;
|
||||
~HALSimWSProviderBuiltInAccelerometer();
|
||||
~HALSimWSProviderBuiltInAccelerometer() override;
|
||||
|
||||
void OnNetValueChanged(const wpi::json& json) override;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class HALSimWSProviderDIO : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderDIO();
|
||||
~HALSimWSProviderDIO() override;
|
||||
|
||||
void OnNetValueChanged(const wpi::json& json) override;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class HALSimWSProviderDriverStation : public HALSimWSHalProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalProvider::HALSimWSHalProvider;
|
||||
~HALSimWSProviderDriverStation();
|
||||
~HALSimWSProviderDriverStation() override;
|
||||
|
||||
void OnNetValueChanged(const wpi::json& json) override;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class HALSimWSProviderEncoder : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderEncoder();
|
||||
~HALSimWSProviderEncoder() override;
|
||||
|
||||
void OnNetValueChanged(const wpi::json& json) override;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class HALSimWSProviderJoystick : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderJoystick();
|
||||
~HALSimWSProviderJoystick() override;
|
||||
|
||||
void OnNetValueChanged(const wpi::json& json) override;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ class HALSimWSProviderPWM : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderPWM();
|
||||
~HALSimWSProviderPWM() override;
|
||||
|
||||
protected:
|
||||
void RegisterCallbacks() override;
|
||||
|
||||
@@ -15,7 +15,7 @@ class HALSimWSProviderRelay : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderRelay();
|
||||
~HALSimWSProviderRelay() override;
|
||||
|
||||
protected:
|
||||
void RegisterCallbacks() override;
|
||||
|
||||
@@ -15,7 +15,7 @@ class HALSimWSProviderRoboRIO : public HALSimWSHalProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalProvider::HALSimWSHalProvider;
|
||||
~HALSimWSProviderRoboRIO();
|
||||
~HALSimWSProviderRoboRIO() override;
|
||||
|
||||
void OnNetValueChanged(const wpi::json& json) override;
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ class HALSimWSProviderSimDevice : public HALSimWSBaseProvider {
|
||||
m_deviceId = deviceId;
|
||||
}
|
||||
|
||||
~HALSimWSProviderSimDevice();
|
||||
~HALSimWSProviderSimDevice() override;
|
||||
|
||||
void OnNetworkConnected(
|
||||
std::shared_ptr<HALSimBaseWebSocketConnection> ws) override;
|
||||
|
||||
@@ -15,7 +15,7 @@ class HALSimWSProviderDigitalPWM : public HALSimWSHalChanProvider {
|
||||
static void Initialize(WSRegisterFunc webRegisterFunc);
|
||||
|
||||
using HALSimWSHalChanProvider::HALSimWSHalChanProvider;
|
||||
~HALSimWSProviderDigitalPWM();
|
||||
~HALSimWSProviderDigitalPWM() override;
|
||||
|
||||
protected:
|
||||
void RegisterCallbacks() override;
|
||||
|
||||
@@ -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));
|
||||
}
|
||||
|
||||
|
||||
@@ -14,12 +14,12 @@ class Command;
|
||||
class CancelButtonScheduler : public ButtonScheduler {
|
||||
public:
|
||||
CancelButtonScheduler(bool last, Trigger* button, Command* orders);
|
||||
virtual ~CancelButtonScheduler() = default;
|
||||
~CancelButtonScheduler() override = default;
|
||||
|
||||
CancelButtonScheduler(CancelButtonScheduler&&) = default;
|
||||
CancelButtonScheduler& operator=(CancelButtonScheduler&&) = default;
|
||||
|
||||
virtual void Execute();
|
||||
void Execute() override;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
@@ -14,12 +14,12 @@ class Command;
|
||||
class HeldButtonScheduler : public ButtonScheduler {
|
||||
public:
|
||||
HeldButtonScheduler(bool last, Trigger* button, Command* orders);
|
||||
virtual ~HeldButtonScheduler() = default;
|
||||
~HeldButtonScheduler() override = default;
|
||||
|
||||
HeldButtonScheduler(HeldButtonScheduler&&) = default;
|
||||
HeldButtonScheduler& operator=(HeldButtonScheduler&&) = default;
|
||||
|
||||
virtual void Execute();
|
||||
void Execute() override;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
@@ -12,7 +12,7 @@ class InternalButton : public Button {
|
||||
public:
|
||||
InternalButton() = default;
|
||||
explicit InternalButton(bool inverted);
|
||||
virtual ~InternalButton() = default;
|
||||
~InternalButton() override = default;
|
||||
|
||||
InternalButton(InternalButton&&) = default;
|
||||
InternalButton& operator=(InternalButton&&) = default;
|
||||
@@ -20,7 +20,7 @@ class InternalButton : public Button {
|
||||
void SetInverted(bool inverted);
|
||||
void SetPressed(bool pressed);
|
||||
|
||||
virtual bool Get();
|
||||
bool Get() override;
|
||||
|
||||
private:
|
||||
bool m_pressed = false;
|
||||
|
||||
@@ -12,12 +12,12 @@ namespace frc {
|
||||
class JoystickButton : public Button {
|
||||
public:
|
||||
JoystickButton(GenericHID* joystick, int buttonNumber);
|
||||
virtual ~JoystickButton() = default;
|
||||
~JoystickButton() override = default;
|
||||
|
||||
JoystickButton(JoystickButton&&) = default;
|
||||
JoystickButton& operator=(JoystickButton&&) = default;
|
||||
|
||||
virtual bool Get();
|
||||
bool Get() override;
|
||||
|
||||
private:
|
||||
GenericHID* m_joystick;
|
||||
|
||||
@@ -19,12 +19,12 @@ class NetworkButton : public Button {
|
||||
NetworkButton(const wpi::Twine& tableName, const wpi::Twine& field);
|
||||
NetworkButton(std::shared_ptr<nt::NetworkTable> table,
|
||||
const wpi::Twine& field);
|
||||
virtual ~NetworkButton() = default;
|
||||
~NetworkButton() override = default;
|
||||
|
||||
NetworkButton(NetworkButton&&) = default;
|
||||
NetworkButton& operator=(NetworkButton&&) = default;
|
||||
|
||||
virtual bool Get();
|
||||
bool Get() override;
|
||||
|
||||
private:
|
||||
nt::NetworkTableEntry m_entry;
|
||||
|
||||
@@ -18,7 +18,7 @@ class POVButton : public Button {
|
||||
* @param povNumber The POV number (@see GenericHID#GetPOV)
|
||||
*/
|
||||
POVButton(GenericHID& joystick, int angle, int povNumber = 0);
|
||||
virtual ~POVButton() = default;
|
||||
~POVButton() override = default;
|
||||
|
||||
POVButton(POVButton&&) = default;
|
||||
POVButton& operator=(POVButton&&) = default;
|
||||
|
||||
@@ -14,12 +14,12 @@ class Command;
|
||||
class PressedButtonScheduler : public ButtonScheduler {
|
||||
public:
|
||||
PressedButtonScheduler(bool last, Trigger* button, Command* orders);
|
||||
virtual ~PressedButtonScheduler() = default;
|
||||
~PressedButtonScheduler() override = default;
|
||||
|
||||
PressedButtonScheduler(PressedButtonScheduler&&) = default;
|
||||
PressedButtonScheduler& operator=(PressedButtonScheduler&&) = default;
|
||||
|
||||
virtual void Execute();
|
||||
void Execute() override;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
@@ -14,12 +14,12 @@ class Command;
|
||||
class ReleasedButtonScheduler : public ButtonScheduler {
|
||||
public:
|
||||
ReleasedButtonScheduler(bool last, Trigger* button, Command* orders);
|
||||
virtual ~ReleasedButtonScheduler() = default;
|
||||
~ReleasedButtonScheduler() override = default;
|
||||
|
||||
ReleasedButtonScheduler(ReleasedButtonScheduler&&) = default;
|
||||
ReleasedButtonScheduler& operator=(ReleasedButtonScheduler&&) = default;
|
||||
|
||||
virtual void Execute();
|
||||
void Execute() override;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
@@ -14,12 +14,12 @@ class Command;
|
||||
class ToggleButtonScheduler : public ButtonScheduler {
|
||||
public:
|
||||
ToggleButtonScheduler(bool last, Trigger* button, Command* orders);
|
||||
virtual ~ToggleButtonScheduler() = default;
|
||||
~ToggleButtonScheduler() override = default;
|
||||
|
||||
ToggleButtonScheduler(ToggleButtonScheduler&&) = default;
|
||||
ToggleButtonScheduler& operator=(ToggleButtonScheduler&&) = default;
|
||||
|
||||
virtual void Execute();
|
||||
void Execute() override;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
@@ -41,7 +41,7 @@ class CommandGroup : public Command {
|
||||
*/
|
||||
explicit CommandGroup(const wpi::Twine& name);
|
||||
|
||||
virtual ~CommandGroup() = default;
|
||||
~CommandGroup() override = default;
|
||||
|
||||
CommandGroup(CommandGroup&&) = default;
|
||||
CommandGroup& operator=(CommandGroup&&) = default;
|
||||
@@ -134,32 +134,32 @@ class CommandGroup : public Command {
|
||||
/**
|
||||
* Can be overridden by teams.
|
||||
*/
|
||||
virtual void Initialize();
|
||||
void Initialize() override;
|
||||
|
||||
/**
|
||||
* Can be overridden by teams.
|
||||
*/
|
||||
virtual void Execute();
|
||||
void Execute() override;
|
||||
|
||||
/**
|
||||
* Can be overridden by teams.
|
||||
*/
|
||||
virtual bool IsFinished();
|
||||
bool IsFinished() override;
|
||||
|
||||
/**
|
||||
* Can be overridden by teams.
|
||||
*/
|
||||
virtual void End();
|
||||
void End() override;
|
||||
|
||||
/**
|
||||
* Can be overridden by teams.
|
||||
*/
|
||||
virtual void Interrupted();
|
||||
void Interrupted() override;
|
||||
|
||||
virtual void _Initialize();
|
||||
virtual void _Execute();
|
||||
virtual void _End();
|
||||
virtual void _Interrupted();
|
||||
void _Initialize() override;
|
||||
void _Execute() override;
|
||||
void _End() override;
|
||||
void _Interrupted() override;
|
||||
|
||||
private:
|
||||
void CancelConflicts(Command* command);
|
||||
|
||||
@@ -49,7 +49,7 @@ class ConditionalCommand : public Command {
|
||||
ConditionalCommand(const wpi::Twine& name, Command* onTrue,
|
||||
Command* onFalse = nullptr);
|
||||
|
||||
virtual ~ConditionalCommand() = default;
|
||||
~ConditionalCommand() override = default;
|
||||
|
||||
ConditionalCommand(ConditionalCommand&&) = default;
|
||||
ConditionalCommand& operator=(ConditionalCommand&&) = default;
|
||||
|
||||
@@ -76,7 +76,7 @@ class InstantCommand : public Command {
|
||||
std::function<void()> func);
|
||||
|
||||
InstantCommand() = default;
|
||||
virtual ~InstantCommand() = default;
|
||||
~InstantCommand() override = default;
|
||||
|
||||
InstantCommand(InstantCommand&&) = default;
|
||||
InstantCommand& operator=(InstantCommand&&) = default;
|
||||
|
||||
@@ -35,7 +35,7 @@ class PIDCommand : public Command, public PIDOutput, public PIDSource {
|
||||
PIDCommand(double p, double i, double d, double period, Subsystem& subsystem);
|
||||
PIDCommand(double p, double i, double d, double f, double period,
|
||||
Subsystem& subsystem);
|
||||
virtual ~PIDCommand() = default;
|
||||
~PIDCommand() override = default;
|
||||
|
||||
PIDCommand(PIDCommand&&) = default;
|
||||
PIDCommand& operator=(PIDCommand&&) = default;
|
||||
|
||||
@@ -15,13 +15,13 @@ namespace frc {
|
||||
class PrintCommand : public InstantCommand {
|
||||
public:
|
||||
explicit PrintCommand(const wpi::Twine& message);
|
||||
virtual ~PrintCommand() = default;
|
||||
~PrintCommand() override = default;
|
||||
|
||||
PrintCommand(PrintCommand&&) = default;
|
||||
PrintCommand& operator=(PrintCommand&&) = default;
|
||||
|
||||
protected:
|
||||
virtual void Initialize();
|
||||
void Initialize() override;
|
||||
|
||||
private:
|
||||
std::string m_message;
|
||||
|
||||
@@ -11,13 +11,13 @@ namespace frc {
|
||||
class StartCommand : public InstantCommand {
|
||||
public:
|
||||
explicit StartCommand(Command* commandToStart);
|
||||
virtual ~StartCommand() = default;
|
||||
~StartCommand() override = default;
|
||||
|
||||
StartCommand(StartCommand&&) = default;
|
||||
StartCommand& operator=(StartCommand&&) = default;
|
||||
|
||||
protected:
|
||||
virtual void Initialize();
|
||||
void Initialize() override;
|
||||
|
||||
private:
|
||||
Command* m_commandToFork;
|
||||
|
||||
@@ -49,7 +49,7 @@ class TimedCommand : public Command {
|
||||
*/
|
||||
TimedCommand(double timeout, Subsystem& subsystem);
|
||||
|
||||
virtual ~TimedCommand() = default;
|
||||
~TimedCommand() override = default;
|
||||
|
||||
TimedCommand(TimedCommand&&) = default;
|
||||
TimedCommand& operator=(TimedCommand&&) = default;
|
||||
|
||||
@@ -27,7 +27,7 @@ class WaitCommand : public TimedCommand {
|
||||
*/
|
||||
WaitCommand(const wpi::Twine& name, double timeout);
|
||||
|
||||
virtual ~WaitCommand() = default;
|
||||
~WaitCommand() override = default;
|
||||
|
||||
WaitCommand(WaitCommand&&) = default;
|
||||
WaitCommand& operator=(WaitCommand&&) = default;
|
||||
|
||||
@@ -14,13 +14,13 @@ class WaitForChildren : public Command {
|
||||
public:
|
||||
explicit WaitForChildren(double timeout);
|
||||
WaitForChildren(const wpi::Twine& name, double timeout);
|
||||
virtual ~WaitForChildren() = default;
|
||||
~WaitForChildren() override = default;
|
||||
|
||||
WaitForChildren(WaitForChildren&&) = default;
|
||||
WaitForChildren& operator=(WaitForChildren&&) = default;
|
||||
|
||||
protected:
|
||||
virtual bool IsFinished();
|
||||
bool IsFinished() override;
|
||||
};
|
||||
|
||||
} // namespace frc
|
||||
|
||||
@@ -24,7 +24,7 @@ class WaitUntilCommand : public Command {
|
||||
|
||||
WaitUntilCommand(const wpi::Twine& name, double time);
|
||||
|
||||
virtual ~WaitUntilCommand() = default;
|
||||
~WaitUntilCommand() override = default;
|
||||
|
||||
WaitUntilCommand(WaitUntilCommand&&) = default;
|
||||
WaitUntilCommand& operator=(WaitUntilCommand&&) = default;
|
||||
@@ -33,7 +33,7 @@ class WaitUntilCommand : public Command {
|
||||
/**
|
||||
* Check if we've reached the actual finish time.
|
||||
*/
|
||||
virtual bool IsFinished();
|
||||
bool IsFinished() override;
|
||||
|
||||
private:
|
||||
double m_time;
|
||||
|
||||
@@ -25,8 +25,8 @@ class DigitalSource : public InterruptableSensorBase {
|
||||
DigitalSource(DigitalSource&&) = default;
|
||||
DigitalSource& operator=(DigitalSource&&) = default;
|
||||
|
||||
virtual HAL_Handle GetPortHandleForRouting() const = 0;
|
||||
virtual AnalogTriggerType GetAnalogTriggerTypeForRouting() const = 0;
|
||||
HAL_Handle GetPortHandleForRouting() const override = 0;
|
||||
AnalogTriggerType GetAnalogTriggerTypeForRouting() const override = 0;
|
||||
virtual bool IsAnalogTrigger() const = 0;
|
||||
virtual int GetChannel() const = 0;
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ class GenericHID : public ErrorBase {
|
||||
enum JoystickHand { kLeftHand = 0, kRightHand = 1 };
|
||||
|
||||
explicit GenericHID(int port);
|
||||
virtual ~GenericHID() = default;
|
||||
~GenericHID() override = default;
|
||||
|
||||
GenericHID(GenericHID&&) = default;
|
||||
GenericHID& operator=(GenericHID&&) = default;
|
||||
|
||||
@@ -35,7 +35,7 @@ class InterruptableSensorBase : public ErrorBase {
|
||||
/**
|
||||
* Free the resources for an interrupt event.
|
||||
*/
|
||||
virtual ~InterruptableSensorBase();
|
||||
~InterruptableSensorBase() override;
|
||||
|
||||
InterruptableSensorBase(InterruptableSensorBase&&) = default;
|
||||
InterruptableSensorBase& operator=(InterruptableSensorBase&&) = default;
|
||||
|
||||
@@ -28,7 +28,7 @@ class IterativeRobot : public IterativeRobotBase {
|
||||
"Use TimedRobot instead. It's a drop-in replacement that provides more "
|
||||
"regular execution periods.")
|
||||
IterativeRobot();
|
||||
virtual ~IterativeRobot() = default;
|
||||
~IterativeRobot() override = default;
|
||||
|
||||
/**
|
||||
* Provide an alternate "main loop" via StartCompetition().
|
||||
|
||||
@@ -178,7 +178,7 @@ class IterativeRobotBase : public RobotBase {
|
||||
*/
|
||||
explicit IterativeRobotBase(units::second_t period);
|
||||
|
||||
virtual ~IterativeRobotBase() = default;
|
||||
~IterativeRobotBase() override = default;
|
||||
|
||||
protected:
|
||||
IterativeRobotBase(IterativeRobotBase&&) = default;
|
||||
|
||||
@@ -39,7 +39,7 @@ class Joystick : public GenericHID {
|
||||
*/
|
||||
explicit Joystick(int port);
|
||||
|
||||
virtual ~Joystick() = default;
|
||||
~Joystick() override = default;
|
||||
|
||||
Joystick(Joystick&&) = default;
|
||||
Joystick& operator=(Joystick&&) = default;
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace frc {
|
||||
class MotorSafety : public ErrorBase {
|
||||
public:
|
||||
MotorSafety();
|
||||
virtual ~MotorSafety();
|
||||
~MotorSafety() override;
|
||||
|
||||
MotorSafety(MotorSafety&& rhs);
|
||||
MotorSafety& operator=(MotorSafety&& rhs);
|
||||
|
||||
@@ -62,7 +62,7 @@ class Notifier : public ErrorBase {
|
||||
/**
|
||||
* Free the resources for a timer event.
|
||||
*/
|
||||
virtual ~Notifier();
|
||||
~Notifier() override;
|
||||
|
||||
Notifier(Notifier&& rhs);
|
||||
Notifier& operator=(Notifier&& rhs);
|
||||
|
||||
@@ -65,7 +65,7 @@ class PIDBase : public PIDInterface,
|
||||
PIDBase(double p, double i, double d, double f, PIDSource& source,
|
||||
PIDOutput& output);
|
||||
|
||||
virtual ~PIDBase() = default;
|
||||
~PIDBase() override = default;
|
||||
|
||||
/**
|
||||
* Return the current PID result.
|
||||
|
||||
@@ -226,7 +226,7 @@ class Preferences : public ErrorBase {
|
||||
|
||||
protected:
|
||||
Preferences();
|
||||
virtual ~Preferences() = default;
|
||||
~Preferences() override = default;
|
||||
|
||||
Preferences(Preferences&&) = default;
|
||||
Preferences& operator=(Preferences&&) = default;
|
||||
|
||||
@@ -28,7 +28,7 @@ namespace frc {
|
||||
*/
|
||||
class Resource : public ErrorBase {
|
||||
public:
|
||||
virtual ~Resource() = default;
|
||||
~Resource() override = default;
|
||||
|
||||
/**
|
||||
* Factory method to create a Resource allocation-tracker *if* needed.
|
||||
|
||||
@@ -126,7 +126,7 @@ class RobotDrive : public MotorSafety {
|
||||
std::shared_ptr<SpeedController> frontRightMotor,
|
||||
std::shared_ptr<SpeedController> rearRightMotor);
|
||||
|
||||
virtual ~RobotDrive() = default;
|
||||
~RobotDrive() override = default;
|
||||
|
||||
RobotDrive(RobotDrive&&) = default;
|
||||
RobotDrive& operator=(RobotDrive&&) = default;
|
||||
|
||||
@@ -87,7 +87,7 @@ class SerialPort : public ErrorBase {
|
||||
int dataBits = 8, Parity parity = kParity_None,
|
||||
StopBits stopBits = kStopBits_One);
|
||||
|
||||
~SerialPort();
|
||||
~SerialPort() override;
|
||||
|
||||
SerialPort(SerialPort&& rhs) = default;
|
||||
SerialPort& operator=(SerialPort&& rhs) = default;
|
||||
|
||||
@@ -29,7 +29,7 @@ class XboxController : public GenericHID {
|
||||
*/
|
||||
explicit XboxController(int port);
|
||||
|
||||
virtual ~XboxController() = default;
|
||||
~XboxController() override = default;
|
||||
|
||||
XboxController(XboxController&&) = default;
|
||||
XboxController& operator=(XboxController&&) = default;
|
||||
|
||||
@@ -23,7 +23,7 @@ class Filter : public PIDSource {
|
||||
explicit Filter(PIDSource& source);
|
||||
WPI_DEPRECATED("This class is no longer used.")
|
||||
explicit Filter(std::shared_ptr<PIDSource> source);
|
||||
virtual ~Filter() = default;
|
||||
~Filter() override = default;
|
||||
|
||||
Filter(Filter&&) = default;
|
||||
Filter& operator=(Filter&&) = default;
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace frc {
|
||||
class Potentiometer : public PIDSource {
|
||||
public:
|
||||
Potentiometer() = default;
|
||||
virtual ~Potentiometer() = default;
|
||||
~Potentiometer() override = default;
|
||||
|
||||
Potentiometer(Potentiometer&&) = default;
|
||||
Potentiometer& operator=(Potentiometer&&) = default;
|
||||
|
||||
@@ -29,7 +29,7 @@ class ShuffleboardComponent : public ShuffleboardComponentBase {
|
||||
ShuffleboardComponent(ShuffleboardContainer& parent, const wpi::Twine& title,
|
||||
const wpi::Twine& type = "");
|
||||
|
||||
virtual ~ShuffleboardComponent() = default;
|
||||
~ShuffleboardComponent() override = default;
|
||||
|
||||
/**
|
||||
* Sets custom properties for this component. Property names are
|
||||
|
||||
@@ -27,7 +27,7 @@ class ShuffleboardComponentBase : public virtual ShuffleboardValue {
|
||||
const wpi::Twine& title,
|
||||
const wpi::Twine& type = "");
|
||||
|
||||
virtual ~ShuffleboardComponentBase() = default;
|
||||
~ShuffleboardComponentBase() override = default;
|
||||
|
||||
void SetType(const wpi::Twine& type);
|
||||
|
||||
|
||||
@@ -45,7 +45,7 @@ class ShuffleboardContainer : public virtual ShuffleboardValue,
|
||||
|
||||
ShuffleboardContainer(ShuffleboardContainer&& rhs) = default;
|
||||
|
||||
virtual ~ShuffleboardContainer() = default;
|
||||
~ShuffleboardContainer() override = default;
|
||||
|
||||
/**
|
||||
* Gets the components that are direct children of this container.
|
||||
|
||||
@@ -432,7 +432,7 @@ class SmartDashboard : public ErrorBase,
|
||||
static void UpdateValues();
|
||||
|
||||
private:
|
||||
virtual ~SmartDashboard() = default;
|
||||
~SmartDashboard() override = default;
|
||||
|
||||
static detail::ListenerExecutor listenerExecutor;
|
||||
};
|
||||
|
||||
@@ -13,7 +13,7 @@ class ReplaceMeSubsystem2 : public frc2::SubsystemBase {
|
||||
/**
|
||||
* Will be called periodically whenever the CommandScheduler runs.
|
||||
*/
|
||||
void Periodic();
|
||||
void Periodic() override;
|
||||
|
||||
private:
|
||||
// Components (e.g. motor controllers and sensors) should generally be
|
||||
|
||||
@@ -18,7 +18,7 @@ class Robot : public frc::TimedRobot {
|
||||
frc::Joystick m_stick{0};
|
||||
|
||||
public:
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
// Drive with arcade style
|
||||
m_robotDrive.ArcadeDrive(m_stick.GetY(), m_stick.GetX());
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ class Robot : public frc::TimedRobot {
|
||||
frc::XboxController m_driverController{0};
|
||||
|
||||
public:
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
// Drive with split arcade style
|
||||
// That means that the Y axis of the left stick moves forward
|
||||
// and backward, and the X of the right stick turns left and right.
|
||||
|
||||
@@ -63,9 +63,11 @@ class Robot : public frc::TimedRobot {
|
||||
frc::sim::EncoderSim m_encoderSim{m_encoder};
|
||||
|
||||
public:
|
||||
void RobotInit() { m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse); }
|
||||
void RobotInit() override {
|
||||
m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse);
|
||||
}
|
||||
|
||||
void SimulationPeriodic() {
|
||||
void SimulationPeriodic() override {
|
||||
// In this method, we update our simulation of what our arm is doing
|
||||
// First, we set our "inputs" (voltages)
|
||||
m_armSim.SetInput(frc::MakeMatrix<1, 1>(
|
||||
@@ -82,7 +84,7 @@ class Robot : public frc::TimedRobot {
|
||||
frc::sim::BatterySim::Calculate({m_armSim.GetCurrentDraw()}));
|
||||
}
|
||||
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
if (m_joystick.GetTrigger()) {
|
||||
// Here, we run PID control like normal, with a constant setpoint of 30in.
|
||||
double pidOutput =
|
||||
@@ -94,7 +96,7 @@ class Robot : public frc::TimedRobot {
|
||||
}
|
||||
}
|
||||
|
||||
void DisabledInit() {
|
||||
void DisabledInit() override {
|
||||
// This just makes sure that our simulation code knows that the motor's off.
|
||||
m_motor.Set(0.0);
|
||||
}
|
||||
|
||||
@@ -62,9 +62,11 @@ class Robot : public frc::TimedRobot {
|
||||
frc::sim::EncoderSim m_encoderSim{m_encoder};
|
||||
|
||||
public:
|
||||
void RobotInit() { m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse); }
|
||||
void RobotInit() override {
|
||||
m_encoder.SetDistancePerPulse(kArmEncoderDistPerPulse);
|
||||
}
|
||||
|
||||
void SimulationPeriodic() {
|
||||
void SimulationPeriodic() override {
|
||||
// In this method, we update our simulation of what our elevator is doing
|
||||
// First, we set our "inputs" (voltages)
|
||||
m_elevatorSim.SetInput(frc::MakeMatrix<1, 1>(
|
||||
@@ -81,7 +83,7 @@ class Robot : public frc::TimedRobot {
|
||||
frc::sim::BatterySim::Calculate({m_elevatorSim.GetCurrentDraw()}));
|
||||
}
|
||||
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
if (m_joystick.GetTrigger()) {
|
||||
// Here, we run PID control like normal, with a constant setpoint of 30in.
|
||||
double pidOutput =
|
||||
@@ -93,7 +95,7 @@ class Robot : public frc::TimedRobot {
|
||||
}
|
||||
}
|
||||
|
||||
void DisabledInit() {
|
||||
void DisabledInit() override {
|
||||
// This just makes sure that our simulation code knows that the motor's off.
|
||||
m_motor.Set(0.0);
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ class DriveTrain : public frc::Subsystem {
|
||||
* with
|
||||
* the joystick.
|
||||
*/
|
||||
void InitDefaultCommand();
|
||||
void InitDefaultCommand() override;
|
||||
|
||||
/**
|
||||
* @param leftAxis Left sides value
|
||||
|
||||
@@ -14,7 +14,7 @@ class DoubleButton : public frc::Trigger {
|
||||
public:
|
||||
DoubleButton(frc::Joystick* joy, int button1, int button2);
|
||||
|
||||
bool Get();
|
||||
bool Get() override;
|
||||
|
||||
private:
|
||||
frc::Joystick& m_joy;
|
||||
|
||||
@@ -93,12 +93,12 @@ class Robot : public frc::TimedRobot {
|
||||
frc::TrapezoidProfile<units::radians>::State m_lastProfiledReference;
|
||||
|
||||
public:
|
||||
void RobotInit() {
|
||||
void RobotInit() override {
|
||||
// We go 2 pi radians per 4096 clicks.
|
||||
m_encoder.SetDistancePerPulse(2.0 * wpi::math::pi / 4096.0);
|
||||
}
|
||||
|
||||
void TeleopInit() {
|
||||
void TeleopInit() override {
|
||||
m_loop.Reset(
|
||||
frc::MakeMatrix<2, 1>(m_encoder.GetDistance(), m_encoder.GetRate()));
|
||||
|
||||
@@ -107,7 +107,7 @@ class Robot : public frc::TimedRobot {
|
||||
units::radians_per_second_t(m_encoder.GetRate())};
|
||||
}
|
||||
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
// Sets the target position of our arm. This is similar to setting the
|
||||
// setpoint of a PID controller.
|
||||
frc::TrapezoidProfile<units::radians>::State goal;
|
||||
|
||||
@@ -90,13 +90,13 @@ class Robot : public frc::TimedRobot {
|
||||
frc::TrapezoidProfile<units::meters>::State m_lastProfiledReference;
|
||||
|
||||
public:
|
||||
void RobotInit() {
|
||||
void RobotInit() override {
|
||||
// Circumference = pi * d, so distance per click = pi * d / counts
|
||||
m_encoder.SetDistancePerPulse(2.0 * wpi::math::pi *
|
||||
kDrumRadius.to<double>() / 4096.0);
|
||||
}
|
||||
|
||||
void TeleopInit() {
|
||||
void TeleopInit() override {
|
||||
// Reset our loop to make sure it's in a known state.
|
||||
m_loop.Reset(
|
||||
frc::MakeMatrix<2, 1>(m_encoder.GetDistance(), m_encoder.GetRate()));
|
||||
@@ -105,7 +105,7 @@ class Robot : public frc::TimedRobot {
|
||||
units::meters_per_second_t(m_encoder.GetRate())};
|
||||
}
|
||||
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
// Sets the target height of our elevator. This is similar to setting the
|
||||
// setpoint of a PID controller.
|
||||
frc::TrapezoidProfile<units::meters>::State goal;
|
||||
|
||||
@@ -81,16 +81,16 @@ class Robot : public frc::TimedRobot {
|
||||
frc::XboxController m_joystick{kJoystickPort};
|
||||
|
||||
public:
|
||||
void RobotInit() {
|
||||
void RobotInit() override {
|
||||
// We go 2 pi radians per 4096 clicks.
|
||||
m_encoder.SetDistancePerPulse(2.0 * wpi::math::pi / 4096.0);
|
||||
}
|
||||
|
||||
void TeleopInit() {
|
||||
void TeleopInit() override {
|
||||
m_loop.Reset(frc::MakeMatrix<1, 1>(m_encoder.GetRate()));
|
||||
}
|
||||
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
// Sets the target speed of our flywheel. This is similar to setting the
|
||||
// setpoint of a PID controller.
|
||||
if (m_joystick.GetBumper(frc::GenericHID::kRightHand)) {
|
||||
|
||||
@@ -82,16 +82,16 @@ class Robot : public frc::TimedRobot {
|
||||
frc::XboxController m_joystick{kJoystickPort};
|
||||
|
||||
public:
|
||||
void RobotInit() {
|
||||
void RobotInit() override {
|
||||
// We go 2 pi radians per 4096 clicks.
|
||||
m_encoder.SetDistancePerPulse(2.0 * wpi::math::pi / 4096.0);
|
||||
}
|
||||
|
||||
void TeleopInit() {
|
||||
void TeleopInit() override {
|
||||
m_loop.Reset(frc::MakeMatrix<1, 1>(m_encoder.GetRate()));
|
||||
}
|
||||
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
// Sets the target speed of our flywheel. This is similar to setting the
|
||||
// setpoint of a PID controller.
|
||||
if (m_joystick.GetBumper(frc::GenericHID::kRightHand)) {
|
||||
|
||||
@@ -19,7 +19,7 @@ class Robot : public frc::TimedRobot {
|
||||
frc::XboxController m_driverController{0};
|
||||
|
||||
public:
|
||||
void TeleopPeriodic() {
|
||||
void TeleopPeriodic() override {
|
||||
// Drive with tank style
|
||||
m_robotDrive.TankDrive(
|
||||
m_driverController.GetY(frc::GenericHID::JoystickHand::kLeftHand),
|
||||
|
||||
@@ -94,65 +94,65 @@ namespace {
|
||||
class TypeTraits : public ::testing::Test {
|
||||
protected:
|
||||
TypeTraits() {}
|
||||
virtual ~TypeTraits() {}
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
~TypeTraits() override {}
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
class UnitManipulators : public ::testing::Test {
|
||||
protected:
|
||||
UnitManipulators() {}
|
||||
virtual ~UnitManipulators() {}
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
~UnitManipulators() override {}
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
class UnitContainer : public ::testing::Test {
|
||||
protected:
|
||||
UnitContainer() {}
|
||||
virtual ~UnitContainer() {}
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
~UnitContainer() override {}
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
class UnitConversion : public ::testing::Test {
|
||||
protected:
|
||||
UnitConversion() {}
|
||||
virtual ~UnitConversion() {}
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
~UnitConversion() override {}
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
class UnitMath : public ::testing::Test {
|
||||
protected:
|
||||
UnitMath() {}
|
||||
virtual ~UnitMath() {}
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
~UnitMath() override {}
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
class CompileTimeArithmetic : public ::testing::Test {
|
||||
protected:
|
||||
CompileTimeArithmetic() {}
|
||||
virtual ~CompileTimeArithmetic() {}
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
~CompileTimeArithmetic() override {}
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
class Constexpr : public ::testing::Test {
|
||||
protected:
|
||||
Constexpr() {}
|
||||
virtual ~Constexpr() {}
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
~Constexpr() override {}
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
};
|
||||
|
||||
class CaseStudies : public ::testing::Test {
|
||||
protected:
|
||||
CaseStudies() {}
|
||||
virtual ~CaseStudies() {}
|
||||
virtual void SetUp() {}
|
||||
virtual void TearDown() {}
|
||||
~CaseStudies() override {}
|
||||
void SetUp() override {}
|
||||
void TearDown() override {}
|
||||
|
||||
struct RightTriangle {
|
||||
using a = unit_value_t<meters, 3>;
|
||||
|
||||
@@ -30,7 +30,7 @@ class EventLoopRunner::Thread : public SafeThread {
|
||||
});
|
||||
}
|
||||
|
||||
void Main() {
|
||||
void Main() override {
|
||||
if (m_loop) {
|
||||
m_loop->Run();
|
||||
}
|
||||
|
||||
@@ -45,7 +45,7 @@ class TCPAcceptor : public NetworkAcceptor {
|
||||
|
||||
public:
|
||||
TCPAcceptor(int port, const char* address, Logger& logger);
|
||||
~TCPAcceptor();
|
||||
~TCPAcceptor() override;
|
||||
|
||||
int start() override;
|
||||
void shutdown() override;
|
||||
|
||||
@@ -43,7 +43,7 @@ class TCPStream : public NetworkStream {
|
||||
friend class TCPAcceptor;
|
||||
friend class TCPConnector;
|
||||
|
||||
~TCPStream();
|
||||
~TCPStream() override;
|
||||
|
||||
size_t send(const char* buffer, size_t len, Error* err) override;
|
||||
size_t receive(char* buffer, size_t len, Error* err,
|
||||
|
||||
@@ -15,7 +15,7 @@ class raw_socket_ostream : public raw_ostream {
|
||||
public:
|
||||
raw_socket_ostream(NetworkStream& stream, bool shouldClose)
|
||||
: m_stream(stream), m_shouldClose(shouldClose) {}
|
||||
~raw_socket_ostream();
|
||||
~raw_socket_ostream() override;
|
||||
|
||||
void close();
|
||||
|
||||
|
||||
@@ -48,7 +48,7 @@ class WebSocketTest : public ::testing::Test {
|
||||
failTimer->Unreference();
|
||||
}
|
||||
|
||||
~WebSocketTest() { Finish(); }
|
||||
~WebSocketTest() override { Finish(); }
|
||||
|
||||
void Finish() {
|
||||
loop->Walk([](uv::Handle& it) { it.Close(); });
|
||||
|
||||
Reference in New Issue
Block a user