mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[build] Enable spotbugs (#3601)
Benign spotbugs warnings were suppressed, and all others were fixed. Bug descriptions are documented here: https://spotbugs.readthedocs.io/en/stable/bugDescriptions.html Co-authored-by: Austin Shalit <austinshalit@gmail.com>
This commit is contained in:
@@ -45,13 +45,13 @@ class MedianFilter {
|
||||
m_orderedValues.erase(std::find(m_orderedValues.begin(),
|
||||
m_orderedValues.end(),
|
||||
m_valueBuffer.pop_back()));
|
||||
curSize = curSize - 1;
|
||||
--curSize;
|
||||
}
|
||||
|
||||
// Add next value to circular buffer
|
||||
m_valueBuffer.push_front(next);
|
||||
|
||||
if (curSize % 2 == 1) {
|
||||
if (curSize % 2 != 0) {
|
||||
// If size is odd, return middle element of sorted list
|
||||
return m_orderedValues[curSize / 2];
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user