mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 05:53:34 +08:00
Safer virtual methods; this breaks compatibility with GCC 4.6
This commit is contained in:
@@ -80,7 +80,7 @@ public:
|
||||
* Returns monotonic timestamp from librt.
|
||||
* @throws uavcan_linux::Exception.
|
||||
*/
|
||||
virtual uavcan::MonotonicTime getMonotonic() const
|
||||
uavcan::MonotonicTime getMonotonic() const override
|
||||
{
|
||||
timespec ts;
|
||||
if (clock_gettime(CLOCK_MONOTONIC, &ts) != 0)
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
* Returns wall time from gettimeofday().
|
||||
* @throws uavcan_linux::Exception.
|
||||
*/
|
||||
virtual uavcan::UtcTime getUtc() const
|
||||
uavcan::UtcTime getUtc() const override
|
||||
{
|
||||
timeval tv;
|
||||
if (gettimeofday(&tv, NULL) != 0)
|
||||
@@ -121,7 +121,7 @@ public:
|
||||
*
|
||||
* @throws uavcan_linux::Exception.
|
||||
*/
|
||||
virtual void adjustUtc(const uavcan::UtcDuration adjustment)
|
||||
void adjustUtc(const uavcan::UtcDuration adjustment) override
|
||||
{
|
||||
if (adj_mode_ == ClockAdjustmentMode::PerDriverPrivate)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user