From 51eee59bc7907f959684194514bb5368fb4aa4c9 Mon Sep 17 00:00:00 2001 From: Orvid King Date: Mon, 27 Jul 2015 15:17:32 -0700 Subject: [PATCH] Fix the size of the enum in FBString.h under MSVC Summary: MSVC defaults enum sizes to int, so explicitly use `size_t` as the base to have it correctly sized. Closes #246 Reviewed By: @yfeldblum Differential Revision: D2282816 Pulled By: @sgolemon --- folly/FBString.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/folly/FBString.h b/folly/FBString.h index c43460a2..53ade9b7 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -810,7 +810,7 @@ private: MediumLarge ml_; }; - enum { + enum : size_t { lastChar = sizeof(MediumLarge) - 1, maxSmallSize = lastChar / sizeof(Char), maxMediumSize = 254 / sizeof(Char), // coincides with the small -- 2.34.1