From: Huapeng Zhou Date: Wed, 24 Aug 2016 17:07:45 +0000 (-0700) Subject: folly: fix enumeral vs non-enumeral type in conditional expression X-Git-Tag: v2016.08.29.00~19 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9ae9af6f6e23b2ef84168cad5f552cf87700de5d;p=folly.git folly: fix enumeral vs non-enumeral type in conditional expression Summary: Titled. ``` mcrouter/lib/carbon/CarbonProtocolReader.h:143:49: required from here folly/small_vector.h:441:38: error: enumeral and non-enumeral type in conditional expression [-Werror] cc1plus: all warnings being treated as errors ``` Reviewed By: yfeldblum Differential Revision: D3763073 fbshipit-source-id: da490e91cdb12dacf37d71c1796239bdc361a31b --- diff --git a/folly/small_vector.h b/folly/small_vector.h index c1d6cd5f..aea4746b 100644 --- a/folly/small_vector.h +++ b/folly/small_vector.h @@ -436,7 +436,7 @@ class small_vector } static constexpr size_type max_size() { - return !BaseType::kShouldUseHeap ? MaxInline + return !BaseType::kShouldUseHeap ? static_cast(MaxInline) : BaseType::policyMaxSize(); }