summaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorArne Juul <arnej@yahoo-inc.com>2016-06-27 13:18:00 +0200
committerArne Juul <arnej@yahoo-inc.com>2016-06-27 13:18:00 +0200
commit53e0514b629e979dfb669b1ff129a133048066f7 (patch)
tree6dcff7ece518cf46cd7226c6674065fa92530696 /storage
parent558993d4df403692ac78a8c308588167ed8cb884 (diff)
use cmath
* avoid using #include <math.h> * add std:: namespace prefix when calling <cmath> functions
Diffstat (limited to 'storage')
-rw-r--r--storage/src/tests/distributor/visitoroperationtest.cpp1
-rw-r--r--storage/src/tests/persistence/mergehandlertest.cpp1
-rw-r--r--storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp1
-rw-r--r--storage/src/vespa/storage/tools/generatedistributionbits.cpp1
-rw-r--r--storage/src/vespa/storage/visiting/visitor.cpp5
5 files changed, 4 insertions, 5 deletions
diff --git a/storage/src/tests/distributor/visitoroperationtest.cpp b/storage/src/tests/distributor/visitoroperationtest.cpp
index a8f28a73fb6..3d00ae18b5f 100644
--- a/storage/src/tests/distributor/visitoroperationtest.cpp
+++ b/storage/src/tests/distributor/visitoroperationtest.cpp
@@ -3,7 +3,6 @@
#include <iomanip>
#include <iostream>
#include <memory>
-#include <math.h>
#include <vespa/storageapi/message/bucket.h>
#include <vespa/storageapi/message/bucketsplitting.h>
#include <vespa/storageapi/message/datagram.h>
diff --git a/storage/src/tests/persistence/mergehandlertest.cpp b/storage/src/tests/persistence/mergehandlertest.cpp
index 3d3ce25a7d7..b0ec11a3e46 100644
--- a/storage/src/tests/persistence/mergehandlertest.cpp
+++ b/storage/src/tests/persistence/mergehandlertest.cpp
@@ -10,6 +10,7 @@
#include <tests/persistence/persistenceproviderwrapper.h>
#include <tests/distributor/messagesenderstub.h>
#include <vespa/storageframework/defaultimplementation/clock/fakeclock.h>
+#include <cmath>
LOG_SETUP(".test.persistence.handler.merge");
diff --git a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp
index 1f5d012e8d0..90b074779c7 100644
--- a/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp
+++ b/storage/src/vespa/storage/distributor/operations/external/visitoroperation.cpp
@@ -9,7 +9,6 @@
#include <vespa/document/select/parser.h>
#include <iomanip>
#include <sstream>
-#include <math.h>
#include <vespa/storage/distributor/distributor.h>
#include <vespa/storage/distributor/bucketownership.h>
#include <vespa/storage/distributor/operations/external/visitororder.h>
diff --git a/storage/src/vespa/storage/tools/generatedistributionbits.cpp b/storage/src/vespa/storage/tools/generatedistributionbits.cpp
index f2ac61241b7..0bf27c5f05c 100644
--- a/storage/src/vespa/storage/tools/generatedistributionbits.cpp
+++ b/storage/src/vespa/storage/tools/generatedistributionbits.cpp
@@ -9,7 +9,6 @@
#include <vespa/storage/bucketdb/judyarray.h>
#include <stdio.h>
#include <iomanip>
-#include <math.h>
#include <vespa/vespalib/util/programoptions.h>
#include <vespa/config-stor-distribution.h>
diff --git a/storage/src/vespa/storage/visiting/visitor.cpp b/storage/src/vespa/storage/visiting/visitor.cpp
index 9639c0768dd..8d5c290146b 100644
--- a/storage/src/vespa/storage/visiting/visitor.cpp
+++ b/storage/src/vespa/storage/visiting/visitor.cpp
@@ -14,6 +14,7 @@
#include <ostream>
#include <sstream>
#include <unordered_map>
+#include <cmath>
LOG_SETUP(".visitor.instance");
@@ -39,8 +40,8 @@ Visitor::HitCounter::addHit(const document::DocumentId& hit, uint32_t size)
const document::OrderDocIdString& order(
static_cast<const document::OrderDocIdString&>(hit.getScheme()));
- int32_t width = (int32_t)pow(2, order.getWidthBits());
- int32_t division = (int32_t)pow(2, order.getDivisionBits());
+ int32_t width = (int32_t)std::pow(2, order.getWidthBits());
+ int32_t division = (int32_t)std::pow(2, order.getDivisionBits());
if (_ordering->getOrder() == document::OrderingSpecification::ASCENDING) {
uint64_t upperLimit = UINT64_MAX;