aboutsummaryrefslogtreecommitdiff
path: root/contrib/epee/include/rolling_median.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/epee/include/rolling_median.h')
-rw-r--r--contrib/epee/include/rolling_median.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/epee/include/rolling_median.h b/contrib/epee/include/rolling_median.h
index 11275aa70..088a71d3e 100644
--- a/contrib/epee/include/rolling_median.h
+++ b/contrib/epee/include/rolling_median.h
@@ -34,6 +34,8 @@
#pragma once
+#include "misc_language.h"
+
#include <stdlib.h>
#include <stdint.h>
@@ -226,7 +228,7 @@ public:
Item v = data[heap[0]];
if (minCt < maxCt)
{
- v = (v + data[heap[-1]]) / 2;
+ v = get_mid<Item>(v, data[heap[-1]]);
}
return v;
}