Improve const correctness.

See https://usfirst.collab.net/sf/tracker/do/viewArtifact/projects.wpilib/tracker.4_defects/artf4148

Change-Id: I47b0d5a91fd49e47e2c7348b0705e998ec815682
This commit is contained in:
Tyler Veness
2015-06-19 17:23:54 -07:00
parent c6b790cadd
commit 5598445a67
172 changed files with 1165 additions and 1140 deletions

View File

@@ -80,7 +80,7 @@ void MotorSafetyHelper::SetExpiration(float expirationTime)
* Retrieve the timeout value for the corresponding motor safety object.
* @return the timeout value in seconds.
*/
float MotorSafetyHelper::GetExpiration()
float MotorSafetyHelper::GetExpiration() const
{
Synchronized sync(m_syncMutex);
return m_expiration;
@@ -90,7 +90,7 @@ float MotorSafetyHelper::GetExpiration()
* Determine if the motor is still operating or has timed out.
* @return a true value if the motor is still operating normally and hasn't timed out.
*/
bool MotorSafetyHelper::IsAlive()
bool MotorSafetyHelper::IsAlive() const
{
Synchronized sync(m_syncMutex);
return !m_enabled || m_stopTime > Timer::GetFPGATimestamp();
@@ -135,7 +135,7 @@ void MotorSafetyHelper::SetSafetyEnabled(bool enabled)
* Return if the motor safety is currently enabled for this devicce.
* @return True if motor safety is enforced for this device
*/
bool MotorSafetyHelper::IsSafetyEnabled()
bool MotorSafetyHelper::IsSafetyEnabled() const
{
Synchronized sync(m_syncMutex);
return m_enabled;