]> git-server-git.apps.pok.os.sepia.ceph.com Git - rocksdb.git/commitdiff
Specify the underlying type of enums.
authorYanqin Jin <yanqin@fb.com>
Wed, 23 May 2018 22:59:16 +0000 (15:59 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Wed, 23 May 2018 23:12:59 +0000 (16:12 -0700)
Summary:
Explicitly specify the underlying type of enums help developers understand the physical storage.
Closes https://github.com/facebook/rocksdb/pull/3892

Differential Revision: D8107027

Pulled By: riversand963

fbshipit-source-id: a00efecbba46df4a3c8eed0994a2d4972ad1a1d3

db/version_edit.cc

index dd84d0986a32621372c3f83717003845f75d368f..ad916036a719b8fbf4a08e760bf6d27d98fb0fbb 100644 (file)
@@ -20,7 +20,7 @@ namespace rocksdb {
 
 // Tag numbers for serialized VersionEdit.  These numbers are written to
 // disk and should not be changed.
-enum Tag {
+enum Tag : uint32_t {
   kComparator = 1,
   kLogNumber = 2,
   kNextFileNumber = 3,
@@ -42,7 +42,7 @@ enum Tag {
   kMaxColumnFamily = 203,
 };
 
-enum CustomTag {
+enum CustomTag : uint32_t {
   kTerminate = 1,  // The end of customized fields
   kNeedCompaction = 2,
   // Since Manifest is not entirely currently forward-compatible, and the only