Skip to content

Commit 6f4ba12

Browse files
committed
add *using* for the subclass methods that are overloaded and virutal
1 parent ad51a30 commit 6f4ba12

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

src/sfTkArdI2C.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ class sfTkArdI2C : public sfTkII2C
144144
return _bufferChunkSize;
145145
}
146146

147+
// For overloaded virtual methods, make sure our subclass methods appear on this object
148+
using sfTkIBus::readRegister;
149+
using sfTkIBus::writeRegister;
150+
147151
protected:
148152
// note: The wire port is protected, allowing access if a sub-class is
149153
// created to implement a special read/write routine

src/sfTkArdSPI.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,8 +178,9 @@ class sfTkArdSPI : public sfTkISPI
178178
*/
179179
virtual sfTkError_t readRegister(uint16_t reg, uint16_t *data, size_t length, size_t &readWords);
180180

181-
// Explicitly let the compiler know we are using the interface methods.
181+
// For overloaded virtual methods, make sure to elevate our subclass methods.
182182
using sfTkIBus::readRegister;
183+
using sfTkIBus::writeRegister;
183184

184185
protected:
185186
// note: The instance data is protected, allowing access if a sub-class is

0 commit comments

Comments
 (0)