]> granicus.if.org Git - transmission/commitdiff
fix -Wfloat-equal warning
authorJordan Lee <jordan@transmissionbt.com>
Sun, 6 Dec 2015 21:07:37 +0000 (21:07 +0000)
committerJordan Lee <jordan@transmissionbt.com>
Sun, 6 Dec 2015 21:07:37 +0000 (21:07 +0000)
When calculating the 'Have' line for transmission-qt's details dialog,
use int64s rather than doubles for sizeWhenDone, leftUntilDone, and
available.

qt/DetailsDialog.cc

index 8dcc9f24d02376dc86eda0af84156888b6c8eb67..bb825cf4780a600a2f760d9683a098997ffad906 100644 (file)
@@ -412,15 +412,15 @@ DetailsDialog::refresh ()
   const QString stateString = string;
 
   // myHaveLabel
-  double sizeWhenDone = 0;
-  double available = 0;
+  uint64_t sizeWhenDone = 0;
+  uint64_t available = 0;
   if (torrents.empty ())
     {
       string = none;
     }
   else
     {
-      double leftUntilDone = 0;
+      uint64_t leftUntilDone = 0;
       int64_t haveTotal = 0;
       int64_t haveVerified = 0;
       int64_t haveUnverified = 0;