Tweak explicit std::max instantiation
authorJosh Watzman <jwatzman@fb.com>
Thu, 7 May 2015 16:41:25 +0000 (09:41 -0700)
committerPraveen Kumar Ramakrishnan <praveenr@fb.com>
Tue, 12 May 2015 00:02:29 +0000 (17:02 -0700)
Summary: Per discussion on D2040509 this is better.

Test Plan: Still builds.

Reviewed By: yfeldblum@fb.com

Subscribers: folly-diffs@, yfeldblum, chalfant

FB internal diff: D2051099

Signature: t1:2051099:1430949575:cc167b57f2d6ff42a73dee4e65d22d04932bb279

Blame Revision: rFBCODE9bdb427be1ef80b612e4f364db7809c6351cfe1c

folly/experimental/fibers/EventBaseLoopController-inl.h

index 363cef2f7be7635ea83a4f3cd49dd82a9545d994..42158dd2047dc5f62b5798656aeb16efd3340b21 100644 (file)
@@ -98,7 +98,7 @@ inline void EventBaseLoopController::timedSchedule(std::function<void()> func,
   auto delay_ms = std::chrono::duration_cast<
     std::chrono::milliseconds>(time - Clock::now()).count() + 1;
   // If clock is not monotonic
-  delay_ms = std::max<long long int>(delay_ms, 0L);
+  delay_ms = std::max<decltype(delay_ms)>(delay_ms, 0L);
   eventBase_->tryRunAfterDelay(func, delay_ms);
 }