Skip to content

Commit 982a6ea

Browse files
committed
Null check the bottom bound in time pose buffer
We don't need to check that the top bound is non-null on L61 b/c we already know from L60 that its non-null
1 parent 13fc50f commit 982a6ea

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

wpi/src/main/kotlin/org/ghrobotics/lib/localization/TimePoseInterpolatableBuffer.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class TimePoseInterpolatableBuffer(
5757
val bottomBound = bufferMap.floorEntry(time)
5858

5959
return when {
60-
topBound == null -> bottomBound.value
60+
topBound == null -> bottomBound?.value
6161
bottomBound == null -> topBound.value
6262
else -> bottomBound.value.interpolate(
6363
topBound.value,

0 commit comments

Comments
 (0)