mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-29 02:21:44 +00:00
clang-tidy: bugprone-virtual-near-miss
A few virtual functions are called by constructors or destructors, which is dangerous in C++ (as an overridden virtual impl won't be called, only the one in the current class). Fix by either marking the function final or not calling at all (if possible).
This commit is contained in:
@@ -55,7 +55,7 @@ class ADXL362 : public ErrorBase,
|
||||
ADXL362& operator=(ADXL362&&) = default;
|
||||
|
||||
// Accelerometer interface
|
||||
void SetRange(Range range) override;
|
||||
void SetRange(Range range) final;
|
||||
double GetX() override;
|
||||
double GetY() override;
|
||||
double GetZ() override;
|
||||
|
||||
Reference in New Issue
Block a user