Allow folly to compile cleanly with most of the rest of MSVC's sign mismatch warnings
[folly.git] / folly / FormatArg.h
index 89c7e9337b5a3486f2841ba1da2b00889d5dd827..33eb262489234dda4a32af0d7384fb73ba4b9740 100644 (file)
@@ -243,10 +243,10 @@ inline StringPiece FormatArg::doSplitKey() {
   const char* p;
   if (e[-1] == ']') {
     --e;
-    p = static_cast<const char*>(memchr(b, '[', e - b));
+    p = static_cast<const char*>(memchr(b, '[', size_t(e - b)));
     enforce(p, "unmatched ']'");
   } else {
-    p = static_cast<const char*>(memchr(b, '.', e - b));
+    p = static_cast<const char*>(memchr(b, '.', size_t(e - b)));
   }
   if (p) {
     key_.assign(p + 1, e);