Skip to content

Commit ce29f89

Browse files
committed
Remove virtual from interface operator definitions
1 parent 78e33b0 commit ce29f89

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

drivers/include/drivers/interfaces/InterfaceDigitalIn.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ struct DigitalIn {
3838
virtual void mode(PinMode pull) = 0;
3939
virtual int is_connected() = 0;
4040

41-
virtual operator int()
41+
operator int()
4242
{
4343
// Underlying implementation is responsible for thread-safety
4444
return read();

drivers/include/drivers/interfaces/InterfaceDigitalInOut.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*
1+
x/*
22
* Mbed-OS Microcontroller Library
33
* Copyright (c) 2021 Embedded Planet
44
* Copyright (c) 2021 ARM Limited
@@ -42,21 +42,21 @@ struct DigitalInOut {
4242
virtual void mode(PinMode pull) = 0;
4343
virtual int is_connected() = 0;
4444

45-
virtual DigitalInOut &operator= (int value)
45+
DigitalInOut &operator= (int value)
4646
{
4747
// Underlying implementation is responsible for thread-safety
4848
write(value);
4949
return *this;
5050
}
5151

52-
virtual DigitalInOut &operator= (DigitalInOut &rhs)
52+
DigitalInOut &operator= (DigitalInOut &rhs)
5353
{
5454
// Underlying implementation is responsible for thread-safety
5555
write(rhs.read());
5656
return *this;
5757
}
5858

59-
virtual operator int()
59+
operator int()
6060
{
6161
// Underlying implementation is responsible for thread-safety
6262
return read();

drivers/include/drivers/interfaces/InterfaceDigitalOut.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,21 +39,21 @@ struct DigitalOut {
3939
virtual int read() = 0;
4040
virtual int is_connected() = 0;
4141

42-
virtual DigitalOut &operator= (int value)
42+
DigitalOut &operator= (int value)
4343
{
4444
// Underlying implementation is responsible for thread-safety
4545
write(value);
4646
return *this;
4747
}
4848

49-
virtual DigitalOut &operator= (DigitalOut &rhs)
49+
DigitalOut &operator= (DigitalOut &rhs)
5050
{
5151
// Underlying implementation is responsible for thread-safety
5252
write(rhs.read());
5353
return *this;
5454
}
5555

56-
virtual operator int()
56+
operator int()
5757
{
5858
// Underlying implementation is responsible for thread-safety
5959
return read();

0 commit comments

Comments
 (0)