Allow folly to compile cleanly with most of the rest of MSVC's sign mismatch warnings
[folly.git] / folly / String.cpp
index 06a7d968c6c29e512835ea64603ef4561641b5d8..37bc231fc4cea9def5dfc181ad04fcb09a6a9483 100644 (file)
@@ -575,7 +575,7 @@ std::string stripLeftMargin(std::string s) {
                           piece->end(),
                           [](char c) { return c != ' ' && c != '\t'; });
     if (needle != piece->end()) {
-      indent = std::min<size_t>(indent, needle - piece->begin());
+      indent = std::min<size_t>(indent, size_t(needle - piece->begin()));
     } else {
       max_length = std::max<size_t>(piece->size(), max_length);
     }