Skip to content

Commit 3f1f180

Browse files
authored
Fix: Removing unnecessary virtual keyword. (#10)
There is simply no need to declare those functions virtual. They don't override anything (no base class) and its highly unlikely that they will be overriden by a future derived class. However, should the later thing happen you can still make those functions virtual if necessary.
1 parent 17fbc33 commit 3f1f180

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

src/LSM6DSOX.h

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,20 @@ class LSM6DSOXClass {
2626
public:
2727
LSM6DSOXClass(TwoWire& wire, uint8_t slaveAddress);
2828
LSM6DSOXClass(SPIClass& spi, int csPin, int irqPin);
29-
virtual ~LSM6DSOXClass();
29+
~LSM6DSOXClass();
3030

3131
int begin();
3232
void end();
3333

3434
// Accelerometer
35-
virtual int readAcceleration(float& x, float& y, float& z); // Results are in g (earth gravity).
36-
virtual float accelerationSampleRate(); // Sampling rate of the sensor.
37-
virtual int accelerationAvailable(); // Check for available data from accelerometer
35+
int readAcceleration(float& x, float& y, float& z); // Results are in g (earth gravity).
36+
float accelerationSampleRate(); // Sampling rate of the sensor.
37+
int accelerationAvailable(); // Check for available data from accelerometer
3838

3939
// Gyroscope
40-
virtual int readGyroscope(float& x, float& y, float& z); // Results are in degrees/second.
41-
virtual float gyroscopeSampleRate(); // Sampling rate of the sensor.
42-
virtual int gyroscopeAvailable(); // Check for available data from gyroscope
40+
int readGyroscope(float& x, float& y, float& z); // Results are in degrees/second.
41+
float gyroscopeSampleRate(); // Sampling rate of the sensor.
42+
int gyroscopeAvailable(); // Check for available data from gyroscope
4343

4444
// Temperature
4545
int readTemperature(int & temperature_deg);

0 commit comments

Comments
 (0)