Skip to content

Commit

Permalink
patch const issue
Browse files Browse the repository at this point in the history
  • Loading branch information
kh9sd committed Oct 15, 2023
1 parent d271fe1 commit 610a685
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils/SensorDataUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
#include <vector>

namespace{
int median(const std::vector<int> &v) {
// apparently this shit can't be const
int median(std::vector<int> &v) {
size_t n = v.size() / 2;
nth_element(v.begin(), v.begin() + n, v.end());
return v[n];
Expand Down

0 comments on commit 610a685

Please sign in to comment.