X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=folly%2FFBString.h;h=703db026e45b7156468138062b86d02fad0d475d;hb=3c0df74643b83f1362b1053082c5e27a96f2c6e3;hp=638ead111315c996f11b4640b1bf7e3c922a7434;hpb=ed8c80a0e0988e4ce687f51ca832a00e4a6b7930;p=folly.git diff --git a/folly/FBString.h b/folly/FBString.h index 638ead11..703db026 100644 --- a/folly/FBString.h +++ b/folly/FBString.h @@ -137,7 +137,8 @@ inline std::pair copy_n( template inline void podFill(Pod* b, Pod* e, T c) { FBSTRING_ASSERT(b && e && b <= e); - /*static*/ if (sizeof(T) == 1) { + constexpr auto kUseMemset = sizeof(T) == 1; + /* static */ if (kUseMemset) { memset(b, c, size_t(e - b)); } else { auto const ee = b + ((e - b) & ~7u);