folly: fix enumeral vs non-enumeral type in conditional expression
authorHuapeng Zhou <hzhou@fb.com>
Wed, 24 Aug 2016 17:07:45 +0000 (10:07 -0700)
committerFacebook Github Bot 1 <facebook-github-bot-1-bot@fb.com>
Wed, 24 Aug 2016 17:08:49 +0000 (10:08 -0700)
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

folly/small_vector.h

index c1d6cd5f27ceec1e09a3719a28711e10efaa6a68..aea4746b3d16c9b95c5096b0b0bedaaae3a10e7e 100644 (file)
@@ -436,7 +436,7 @@ class small_vector
   }
 
   static constexpr size_type max_size() {
-    return !BaseType::kShouldUseHeap ? MaxInline
+    return !BaseType::kShouldUseHeap ? static_cast<size_type>(MaxInline)
                                      : BaseType::policyMaxSize();
   }