be explicit about what integer type we're using
authorDaniel Sloof <goapsychadelic@gmail.com>
Thu, 14 Aug 2014 21:12:19 +0000 (14:12 -0700)
committerSara Golemon <sgolemon@fb.com>
Fri, 15 Aug 2014 02:19:56 +0000 (19:19 -0700)
Summary:
Fixes the OSX build.
Closes #79

Test Plan: author tested, contbuild, flib

Reviewed By: joelm@fb.com

FB internal diff: D1498545

folly/gen/String-inl.h

index 5a522ce5e4867dcd6c97a7cd3a2c7fc0ac6742bf..2eabad36a132e509e05068fd36d223b125047236 100644 (file)
@@ -101,7 +101,7 @@ bool consumeFixedSizeChunks(Callback& cb, StringPiece& s, uint64_t maxLength) {
   while (!s.empty()) {
     auto num_to_add = s.size();
     if (maxLength) {
-      num_to_add = std::min(num_to_add, maxLength);
+      num_to_add = std::min<uint64_t>(num_to_add, maxLength);
     }
     if (!cb(StringPiece(s.begin(), num_to_add))) {
       return false;