mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-01 02:41:48 +00:00
artf4107: clang-modernize was run on WPILib
Loops were converted to their range-based equivalents, variable types were replaced with auto where the type was already specified on the same line, the override keyword was added, and instances of NULL and assignments of 0 to pointers were replaced with nullptr. Change-Id: If281e46a2e2e1c37f278d56df9915236d4b2c864
This commit is contained in:
@@ -13,7 +13,7 @@
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
MotorSafetyHelper *MotorSafetyHelper::m_headHelper = NULL;
|
||||
MotorSafetyHelper *MotorSafetyHelper::m_headHelper = nullptr;
|
||||
ReentrantSemaphore MotorSafetyHelper::m_listMutex;
|
||||
|
||||
/**
|
||||
@@ -47,9 +47,9 @@ MotorSafetyHelper::~MotorSafetyHelper()
|
||||
}
|
||||
else
|
||||
{
|
||||
MotorSafetyHelper *prev = NULL;
|
||||
MotorSafetyHelper *prev = nullptr;
|
||||
MotorSafetyHelper *cur = m_headHelper;
|
||||
while (cur != this && cur != NULL)
|
||||
while (cur != this && cur != nullptr)
|
||||
prev = cur, cur = cur->m_nextHelper;
|
||||
if (cur == this)
|
||||
prev->m_nextHelper = cur->m_nextHelper;
|
||||
@@ -149,7 +149,7 @@ bool MotorSafetyHelper::IsSafetyEnabled() const
|
||||
void MotorSafetyHelper::CheckMotors()
|
||||
{
|
||||
Synchronized sync(m_listMutex);
|
||||
for (MotorSafetyHelper *msh = m_headHelper; msh != NULL; msh = msh->m_nextHelper)
|
||||
for (MotorSafetyHelper *msh = m_headHelper; msh != nullptr; msh = msh->m_nextHelper)
|
||||
{
|
||||
msh->Check();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user