mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
Some general cleanups in the HAL (#188)
AnalogTrigger initialization checks are now in the correct order. Plus frees no longer grab the structure if it is not needed.
This commit is contained in:
committed by
Peter Johnson
parent
8ac7e44f19
commit
866046edd1
@@ -49,10 +49,6 @@ HAL_CounterHandle HAL_InitializeCounter(HAL_Counter_Mode mode, int32_t* index,
|
||||
}
|
||||
|
||||
void HAL_FreeCounter(HAL_CounterHandle counter_handle, int32_t* status) {
|
||||
auto counter = counterHandles.Get(counter_handle);
|
||||
if (counter == nullptr) { // don't throw status as unneccesary
|
||||
return;
|
||||
}
|
||||
counterHandles.Free(counter_handle);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user