Fix AsyncFileWriterTest due to long being 32-bit on Windows
authorChristopher Dykes <cdykes@fb.com>
Fri, 23 Jun 2017 21:13:19 +0000 (14:13 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Fri, 23 Jun 2017 21:20:30 +0000 (14:20 -0700)
Summary: `long` is only 32-bits on Windows, which means this call to `std::min` was ambiguous, which caused a compile error.

Reviewed By: simpkins

Differential Revision: D5305964

fbshipit-source-id: 7e4152006e163a0301652be46318f0fc937e5ead

folly/experimental/logging/test/AsyncFileWriterTest.cpp

index 3879740..962ec8c 100644 (file)
@@ -255,7 +255,7 @@ class ReadStats {
       : deadline_{steady_clock::now() +
                   milliseconds{FLAGS_async_discard_timeout_msec}},
         readSleepUS_{static_cast<uint64_t>(
-            std::min(0L, FLAGS_async_discard_read_sleep_usec))} {}
+            std::min(int64_t{0}, FLAGS_async_discard_read_sleep_usec))} {}
 
   void clearSleepDuration() {
     readSleepUS_.store(0);