mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-24 01:31:46 +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
@@ -63,8 +63,6 @@ HAL_AnalogInputHandle HAL_InitializeAnalogInputPort(HAL_PortHandle port_handle,
|
||||
}
|
||||
|
||||
void HAL_FreeAnalogInputPort(HAL_AnalogInputHandle analog_port_handle) {
|
||||
auto port = analogInputHandles.Get(analog_port_handle);
|
||||
if (!port) return;
|
||||
// no status, so no need to check for a proper free.
|
||||
analogInputHandles.Free(analog_port_handle);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user