summaryrefslogtreecommitdiff
path: root/node/RingBuffer.hpp
diff options
context:
space:
mode:
authorGrant Limberg <grant.limberg@zerotier.com>2019-06-13 10:27:54 -0700
committerGrant Limberg <grant.limberg@zerotier.com>2019-06-13 10:28:09 -0700
commit47d29ddcaf677a5376f54e6901bcdc38e499b16d (patch)
tree41a840d935dc2a90b063ac619008bcc085e67c75 /node/RingBuffer.hpp
parentf411eb1651bbfaa276eab02cf368e9fcb3905a15 (diff)
downloadinfinitytier-47d29ddcaf677a5376f54e6901bcdc38e499b16d.tar.gz
infinitytier-47d29ddcaf677a5376f54e6901bcdc38e499b16d.zip
Compiler warning cleanup
Diffstat (limited to 'node/RingBuffer.hpp')
-rw-r--r--node/RingBuffer.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/node/RingBuffer.hpp b/node/RingBuffer.hpp
index 8b11e9b1..0f29a89a 100644
--- a/node/RingBuffer.hpp
+++ b/node/RingBuffer.hpp
@@ -268,7 +268,7 @@ public:
for (size_t i=0; i<curr_cnt; i++) {
iterator = (iterator + S - 1) % curr_cnt;
float deviation = (buf[i] - cached_mean);
- sum_of_squared_deviations += (deviation*deviation);
+ sum_of_squared_deviations += (T)(deviation*deviation);
}
float variance = (float)sum_of_squared_deviations / (float)(S - 1);
return variance;