From 9a63cd36cd304db503ca044f81cb7dbaf98b651c Mon Sep 17 00:00:00 2001 From: Tyler Veness Date: Sat, 3 Oct 2020 08:36:51 -0700 Subject: [PATCH] [wpilibc] Const-qualify Watchdog comparison operator (#2767) --- wpilibc/src/main/native/cpp/Watchdog.cpp | 2 +- wpilibc/src/main/native/include/frc/Watchdog.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wpilibc/src/main/native/cpp/Watchdog.cpp b/wpilibc/src/main/native/cpp/Watchdog.cpp index 2180d0df3c..35858b851f 100644 --- a/wpilibc/src/main/native/cpp/Watchdog.cpp +++ b/wpilibc/src/main/native/cpp/Watchdog.cpp @@ -220,7 +220,7 @@ void Watchdog::SuppressTimeoutMessage(bool suppress) { m_suppressTimeoutMessage = suppress; } -bool Watchdog::operator>(const Watchdog& rhs) { +bool Watchdog::operator>(const Watchdog& rhs) const { return m_expirationTime > rhs.m_expirationTime; } diff --git a/wpilibc/src/main/native/include/frc/Watchdog.h b/wpilibc/src/main/native/include/frc/Watchdog.h index 7e0caba8e5..6fc3793147 100644 --- a/wpilibc/src/main/native/include/frc/Watchdog.h +++ b/wpilibc/src/main/native/include/frc/Watchdog.h @@ -162,7 +162,7 @@ class Watchdog { class Impl; Impl* m_impl; - bool operator>(const Watchdog& rhs); + bool operator>(const Watchdog& rhs) const; static Impl* GetImpl(); };