diff options
author | Arne Juul <arnej@yahoo-inc.com> | 2016-06-27 13:14:59 +0200 |
---|---|---|
committer | Arne Juul <arnej@yahoo-inc.com> | 2016-06-27 13:14:59 +0200 |
commit | 1dd3ec061ad1dc61fc20f606111ab16ef569e93c (patch) | |
tree | 54c0096780e2b8c599688774fa45ab1157cd2401 /searchsummary/src | |
parent | 8543e41af8f7f85e9b5d4282925c555ee37e2a42 (diff) |
use cmath
* avoid using #include <math.h>
* add std:: namespace prefix when calling <cmath> functions
Diffstat (limited to 'searchsummary/src')
3 files changed, 3 insertions, 2 deletions
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/docsumfieldwriter.cpp b/searchsummary/src/vespa/searchsummary/docsummary/docsumfieldwriter.cpp index fa379397476..43fc72f3aad 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/docsumfieldwriter.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/docsumfieldwriter.cpp @@ -4,7 +4,6 @@ #include <vespa/fastos/fastos.h> #include <vespa/log/log.h> -#include <math.h> #include <vespa/searchlib/attribute/iattributemanager.h> #include <vespa/searchlib/common/documentlocations.h> #include <vespa/searchlib/common/location.h> diff --git a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp index 6c47b305f09..f4d0889c711 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp @@ -3,6 +3,7 @@ #include <vespa/fastos/fastos.h> #include "positionsdfw.h" #include <vespa/log/log.h> +#include <cmath> LOG_SETUP(".searchlib.docsummary.positionsdfw"); @@ -60,7 +61,7 @@ AbsDistanceDFW::findMinDistance(uint32_t docid, absdist = dist2; } } - return (uint64_t) sqrt((double) absdist); + return (uint64_t) std::sqrt((double) absdist); } void diff --git a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp index 8b180dc3d78..7fc85b4cf5d 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/summaryfeaturesdfw.cpp @@ -7,6 +7,7 @@ LOG_SETUP(".searchlib.docsummary.summaryfeaturesdfw"); #include <vespa/searchlib/common/packets.h> #include <vespa/searchsummary/docsummary/docsumformat.h> #include "summaryfeaturesdfw.h" +#include <cmath> namespace search { namespace docsummary { |