summaryrefslogtreecommitdiff
path: root/apt-pkg/contrib/progress.cc
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-05-04 19:02:23 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2018-05-05 00:34:22 +0200
commit5f9c05db78926dfb063fdd0493ecc6b8e12c2e02 (patch)
treea05f9b87d660dc1f4b7cb20de1f8c59eec5ea7a7 /apt-pkg/contrib/progress.cc
parent1d77c915005f7630949e2ce706055ee3235009b6 (diff)
Avoid implicitly promotion of float to double
Reported-By: gcc -Wdouble-promotion Gbp-Dch: Ignore
Diffstat (limited to 'apt-pkg/contrib/progress.cc')
-rw-r--r--apt-pkg/contrib/progress.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/apt-pkg/contrib/progress.cc b/apt-pkg/contrib/progress.cc
index 5499f0946..6743889b8 100644
--- a/apt-pkg/contrib/progress.cc
+++ b/apt-pkg/contrib/progress.cc
@@ -118,7 +118,7 @@ bool OpProgress::CheckChange(float Interval)
// Check time delta
struct timeval Now;
gettimeofday(&Now,0);
- double Diff = Now.tv_sec - LastTime.tv_sec + (Now.tv_usec - LastTime.tv_usec)/1000000.0;
+ decltype(Interval) const Diff = Now.tv_sec - LastTime.tv_sec + (Now.tv_usec - LastTime.tv_usec)/1000000.0;
if (Diff < Interval)
return false;
LastTime = Now;