From 3b9f9bb56499eef6a2e88e68abab3452ed66759d Mon Sep 17 00:00:00 2001 From: Kevin Bracey Date: Mon, 11 Sep 2017 12:35:30 +0300 Subject: [PATCH] UARTSerial: Avoid readable() ambiguity UARTSerial inherits both FileHandle::readable() [public] and SerialBase::readable() [private], so calling readable() on a UARTSerial object produces an ambiguous member error. Add using declarations to direct towards the FileHandle versions of readable and writable. There's currently no ambiguity for writable, as SerialBase uses the spelling 'writeable', but add a using directive for that anyway, in case SerialBase gains 'writable' later. --- drivers/UARTSerial.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/UARTSerial.h b/drivers/UARTSerial.h index ebb5779c1c..a269dea285 100644 --- a/drivers/UARTSerial.h +++ b/drivers/UARTSerial.h @@ -56,6 +56,12 @@ public: */ virtual short poll(short events) const; + /* Resolve ambiguities versus our private SerialBase + * (for writable, spelling differs, but just in case) + */ + using FileHandle::readable; + using FileHandle::writable; + /** Write the contents of a buffer to a file * * @param buffer The buffer to write from