Make most implicit integer truncations and sign conversions explicit
[folly.git] / folly / gen / Parallel-inl.h
index 0992cacd889c17da41e1ee5f357cf748864bcaec..18c7c4342d0a32f35c7857ca34932e2207f2fbc4 100644 (file)
@@ -293,8 +293,9 @@ class Parallel : public Operator<Parallel<Ops>> {
         : source_(std::move(source)),
           ops_(std::move(ops)),
           threads_(
-              threads ? threads
-                      : std::max<size_t>(1, sysconf(_SC_NPROCESSORS_CONF))) {}
+              threads
+                  ? threads
+                  : size_t(std::max<long>(1, sysconf(_SC_NPROCESSORS_CONF)))) {}
 
     template <class Handler>
     bool apply(Handler&& handler) const {