From 64a21e782d6c9081f13f8398e6408c13648d1d14 Mon Sep 17 00:00:00 2001 From: Uwe Hermann Date: Wed, 10 May 2017 16:50:46 +0200 Subject: [PATCH] Fix a build issue with std::roundf() on Android. Apparently std::roundf() doesn't exist there, but plain roundf() from does. This closes bug #945. --- pv/view/timemarker.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pv/view/timemarker.cpp b/pv/view/timemarker.cpp index eaa03b94..853f7c02 100644 --- a/pv/view/timemarker.cpp +++ b/pv/view/timemarker.cpp @@ -74,7 +74,8 @@ void TimeMarker::set_time(const pv::util::Timestamp& time) float TimeMarker::get_x() const { - return std::roundf(((time_ - view_.offset()) / view_.scale()).convert_to()) + 0.5f; + // Use roundf() from cmath, std::roundf() causes Android issues (see #945). + return roundf(((time_ - view_.offset()) / view_.scale()).convert_to()) + 0.5f; } QPoint TimeMarker::point(const QRect &rect) const -- 2.30.2