From 8c420fa4c1ddd88f8237c5464223a56685ae6dcf Mon Sep 17 00:00:00 2001 From: Benjamin Hall Date: Wed, 15 May 2024 16:46:10 -0400 Subject: [PATCH] [wpimath] Modify C++ `LinearFilter::Reset(span, span)` to take `span` (#6628) Previously, the overload took a span. However, m_inputs and m_outputs store type T, so the function could not be called for any T that does not have an implicit constructor from double. --- wpimath/src/main/native/include/frc/filter/LinearFilter.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/wpimath/src/main/native/include/frc/filter/LinearFilter.h b/wpimath/src/main/native/include/frc/filter/LinearFilter.h index 3bc5465a3d..3f5462d594 100644 --- a/wpimath/src/main/native/include/frc/filter/LinearFilter.h +++ b/wpimath/src/main/native/include/frc/filter/LinearFilter.h @@ -321,8 +321,7 @@ class LinearFilter { * @throws std::runtime_error if size of inputBuffer or outputBuffer does not * match the size of ffGains and fbGains provided in the constructor. */ - void Reset(std::span inputBuffer, - std::span outputBuffer) { + void Reset(std::span inputBuffer, std::span outputBuffer) { // Clear buffers Reset();