Make most implicit integer truncations and sign conversions explicit
[folly.git] / folly / stats / Histogram.h
index fbb259831d750268a25a30a6eefea1e784833769..a6daa374b0f41948388f878be94a28728990c1e1 100644 (file)
@@ -125,7 +125,7 @@ class HistogramBuckets {
       return max_;
     }
 
-    return min_ + ((idx - 1) * bucketSize_);
+    return ValueType(min_ + ((idx - 1) * bucketSize_));
   }
 
   /*
@@ -140,7 +140,7 @@ class HistogramBuckets {
       return std::numeric_limits<ValueType>::max();
     }
 
-    return min_ + (idx * bucketSize_);
+    return ValueType(min_ + (idx * bucketSize_));
   }
 
   /**