From e54f27e524e18ea2bf0290699814c5fe40b1e8d4 Mon Sep 17 00:00:00 2001 From: Arne Juul Date: Mon, 27 Jun 2016 13:06:20 +0200 Subject: use cmath * avoid using #include * add std:: namespace prefix when calling functions --- fastos/src/tests/prefetchtest.cpp | 2 -- fastos/src/tests/timetest.cpp | 4 ++-- fastos/src/vespa/fastos/timestamp.cpp | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) (limited to 'fastos') diff --git a/fastos/src/tests/prefetchtest.cpp b/fastos/src/tests/prefetchtest.cpp index efb68be0362..bd86f091f09 100644 --- a/fastos/src/tests/prefetchtest.cpp +++ b/fastos/src/tests/prefetchtest.cpp @@ -15,8 +15,6 @@ #include -#include - #include #include "tests.h" diff --git a/fastos/src/tests/timetest.cpp b/fastos/src/tests/timetest.cpp index b787914ad89..a8db91ed0c8 100644 --- a/fastos/src/tests/timetest.cpp +++ b/fastos/src/tests/timetest.cpp @@ -1,6 +1,6 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #include -#include +#include #include #include "tests.h" @@ -236,7 +236,7 @@ public: double millis = timing.MilliSecs(); double correct = i; - Progress((fabs(millis - correct)/correct) < 0.15, + Progress((std::fabs(millis - correct)/correct) < 0.15, "Elapsed time measurement: %d", static_cast(millis)); } diff --git a/fastos/src/vespa/fastos/timestamp.cpp b/fastos/src/vespa/fastos/timestamp.cpp index 3f56a37b4e2..0df3ace288f 100644 --- a/fastos/src/vespa/fastos/timestamp.cpp +++ b/fastos/src/vespa/fastos/timestamp.cpp @@ -17,7 +17,7 @@ std::string TimeStamp::asString(double timeInSeconds) { double intpart; - double fractpart = modf(timeInSeconds, &intpart); + double fractpart = std::modf(timeInSeconds, &intpart); time_t timeStamp = (time_t)intpart; struct tm timeStruct; gmtime_r(&timeStamp, &timeStruct); -- cgit v1.2.3