Allow folly to compile cleanly with most of the rest of MSVC's sign mismatch warnings
[folly.git] / folly / detail / GroupVarintDetail.h
index d44e79959d27549400fdc486e6eb3f4d478d02f9..4a94c7d43416ef547e199de055e4efc428b2eaa4 100644 (file)
@@ -30,7 +30,7 @@ struct GroupVarintTraits;
 
 template <>
 struct GroupVarintTraits<uint32_t> {
-  enum {
+  enum : uint32_t {
     kGroupSize = 4,
     kHeaderSize = 1,
   };
@@ -38,7 +38,7 @@ struct GroupVarintTraits<uint32_t> {
 
 template <>
 struct GroupVarintTraits<uint64_t> {
-  enum {
+  enum : uint32_t {
     kGroupSize = 5,
     kHeaderSize = 2,
   };
@@ -48,7 +48,7 @@ template <typename T>
 class GroupVarintBase {
  protected:
   typedef GroupVarintTraits<T> Traits;
-  enum { kHeaderSize = Traits::kHeaderSize };
+  enum : uint32_t { kHeaderSize = Traits::kHeaderSize };
 
  public:
   typedef T type;
@@ -56,12 +56,12 @@ class GroupVarintBase {
   /**
    * Number of integers encoded / decoded in one pass.
    */
-  enum { kGroupSize = Traits::kGroupSize };
+  enum : uint32_t { kGroupSize = Traits::kGroupSize };
 
   /**
    * Maximum encoded size.
    */
-  enum { kMaxSize = kHeaderSize + sizeof(type) * kGroupSize };
+  enum : uint32_t { kMaxSize = kHeaderSize + sizeof(type) * kGroupSize };
 
   /**
    * Maximum size for n values.