Allow folly to compile cleanly with most of the rest of MSVC's sign mismatch warnings
[folly.git] / folly / detail / RangeCommon.h
index f7c8a4a50d050eff90b2b9043e32880355a35457..8eba63e9d5ce4028904f562f93df9ed39a28b1ee 100644 (file)
@@ -41,7 +41,7 @@ class StringPieceLite {
   const char* data() const { return b_; }
   const char* begin() const { return b_; }
   const char* end() const { return e_; }
-  size_t size() const { return e_ - b_; }
+  size_t size() const { return size_t(e_ - b_); }
   bool empty() const { return size() == 0; }
   const char& operator[](size_t i) const { DCHECK_GT(size(), i); return b_[i]; }
   template <typename Range>