-Wnon-virtual-dtor -Woverloaded-virtual -Wsign-promo

This commit is contained in:
Pavel Kirienko
2016-07-29 16:02:31 +03:00
parent 38a241a90a
commit 32d8851dde
6 changed files with 12 additions and 10 deletions
+5 -5
View File
@@ -73,11 +73,11 @@ struct PairableCanDriver : public uavcan::ICanDriver, public uavcan::ICanIface
virtual uavcan::ICanIface* getIface(uavcan::uint8_t iface_index)
{
if (iface_index == 0)
{
return this;
}
return UAVCAN_NULLPTR;
return (iface_index == 0) ? this : UAVCAN_NULLPTR;
}
virtual const uavcan::ICanIface* getIface(uavcan::uint8_t iface_index) const
{
return (iface_index == 0) ? this : UAVCAN_NULLPTR;
}
virtual uavcan::uint8_t getNumIfaces() const { return 1; }