提交 3645f0c3 编写于 作者: A Alastair Quadros

abs -> std::abs

warning: using integer absolute value function 'abs' when argument is of
floating point type [-Wabsolute-value]
上级 04b4a565
......@@ -36,6 +36,7 @@
#include <cassert>
#include <cstring>
#include <stdarg.h>
#include <cmath>
#include "flann/general.h"
#include "flann/algorithms/nn_index.h"
......@@ -663,7 +664,7 @@ private:
ElementType max_span = 0;
size_t div_feat = 0;
for (size_t i=0;i<veclen_;++i) {
ElementType span = abs(point[i]-leaf_point[i]);
ElementType span = std::abs(point[i]-leaf_point[i]);
if (span > max_span) {
max_span = span;
div_feat = i;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册