projects
/
folly.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8fe31d9
)
Fix the size of the enum in FBString.h under MSVC
author
Orvid King
<blah38621@gmail.com>
Mon, 27 Jul 2015 22:17:32 +0000
(15:17 -0700)
committer
facebook-github-bot-4
<folly-bot@fb.com>
Mon, 27 Jul 2015 23:22:20 +0000
(16:22 -0700)
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
patch
|
blob
|
history
diff --git
a/folly/FBString.h
b/folly/FBString.h
index c43460a2a5fb13632fffcea9d7475ba8162b51e1..53ade9b7adad45e333f3f26bb639436974c143aa 100644
(file)
--- 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