Explicit virtual keyword

This commit is contained in:
Pavel Kirienko
2014-04-19 18:51:36 +04:00
parent f31d46ea6c
commit c1be9f1fef
15 changed files with 85 additions and 84 deletions
@@ -34,19 +34,19 @@ class UAVCAN_EXPORT MarshalBufferProvider : public IMarshalBufferProvider
{
StaticTransferBuffer<MaxSize_> buf_;
int read(unsigned offset, uint8_t* data, unsigned len) const
virtual int read(unsigned offset, uint8_t* data, unsigned len) const
{
return buf_.read(offset, data, len);
}
int write(unsigned offset, const uint8_t* data, unsigned len)
virtual int write(unsigned offset, const uint8_t* data, unsigned len)
{
return buf_.write(offset, data, len);
}
const uint8_t* getDataPtr() const { return buf_.getRawPtr(); }
virtual const uint8_t* getDataPtr() const { return buf_.getRawPtr(); }
unsigned getDataLength() const { return buf_.getMaxWritePos(); }
virtual unsigned getDataLength() const { return buf_.getMaxWritePos(); }
public:
void reset() { buf_.reset(); }
@@ -57,7 +57,7 @@ class UAVCAN_EXPORT MarshalBufferProvider : public IMarshalBufferProvider
public:
enum { MaxSize = MaxSize_ };
IMarshalBuffer* getBuffer(unsigned size)
virtual IMarshalBuffer* getBuffer(unsigned size)
{
if (size > MaxSize)
{
@@ -130,7 +130,7 @@ private:
void handleReceivedDataStruct(ReceivedDataStructure<ResponseType>& response);
void handleDeadline(MonotonicTime);
virtual void handleDeadline(MonotonicTime);
public:
explicit ServiceClient(INode& node, const Callback& callback = Callback())
+2 -2
View File
@@ -41,7 +41,7 @@ class UAVCAN_EXPORT TimerBase : private DeadlineHandler
{
MonotonicDuration period_;
void handleDeadline(MonotonicTime current);
virtual void handleDeadline(MonotonicTime current);
public:
using DeadlineHandler::stop;
@@ -73,7 +73,7 @@ public:
private:
Callback callback_;
void handleTimerEvent(const TimerEvent& event)
virtual void handleTimerEvent(const TimerEvent& event)
{
if (try_implicit_cast<bool>(callback_, true))
{