summaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2016-06-27 13:16:17 +0200
committerArne Juul <arnej@yahoo-inc.com>2016-06-27 13:16:17 +0200
commit8cbd9f55a8247291b21dc90a7621bc02554935a1 (patch)
tree55ba1747c35833ec89c1d5f6d61c5e57b58d874b /searchcore
parentae1618a9d214f6b61e7f4c3459f5cf1f6e3cfb3b (diff)
use cmath
* avoid using #include <math.h> * add std:: namespace prefix when calling <cmath> functions
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/tests/applyattrupdates/applyattrupdates.cpp1
-rw-r--r--searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp3
2 files changed, 3 insertions, 1 deletions
diff --git a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
index bc1f44740da..ea85cebaf44 100644
--- a/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
+++ b/searchcore/src/tests/applyattrupdates/applyattrupdates.cpp
@@ -20,6 +20,7 @@
#include <vespa/searchlib/attribute/attributefactory.h>
#include <vespa/searchlib/attribute/attributevector.hpp>
#include <vespa/vespalib/testkit/testapp.h>
+#include <cmath>
LOG_SETUP("applyattrupdates_test");
diff --git a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
index e6bf8f616b7..781da158254 100644
--- a/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
+++ b/searchcore/src/vespa/searchcore/proton/matching/match_thread.cpp
@@ -20,6 +20,7 @@
#include <vespa/vespalib/util/closure.h>
#include <vespa/vespalib/util/thread_bundle.h>
#include <vespa/log/log.h>
+#include <cmath>
LOG_SETUP(".proton.matching.match_thread");
@@ -68,7 +69,7 @@ MatchThread::match_loop(MatchTools &matchTools, IteratorT search,
ranking.run(docId);
double score = *score_feature;
// convert NaN and Inf scores to -Inf
- if (__builtin_expect(isnan(score) || isinf(score), false)) {
+ if (__builtin_expect(std::isnan(score) || std::isinf(score), false)) {
score = -HUGE_VAL;
}
// invert test since default drop limit is -NaN (keep all hits)