浏览代码

Move to constexpr.

Thomas Van Lenten 5 年之前
父节点
当前提交
a8a400da5d
共有 1 个文件被更改,包括 6 次插入6 次删除
  1. 6 6
      src/google/protobuf/compiler/objectivec/objectivec_helpers.cc

+ 6 - 6
src/google/protobuf/compiler/objectivec/objectivec_helpers.cc

@@ -1301,14 +1301,14 @@ class DecodeDataBuilder {
   }
 
  private:
-  static const uint8 kAddUnderscore = 0x80;
+  static constexpr uint8 kAddUnderscore = 0x80;
 
-  static const uint8 kOpAsIs        = 0x00;
-  static const uint8 kOpFirstUpper  = 0x40;
-  static const uint8 kOpFirstLower  = 0x20;
-  static const uint8 kOpAllUpper    = 0x60;
+  static constexpr uint8 kOpAsIs = 0x00;
+  static constexpr uint8 kOpFirstUpper = 0x40;
+  static constexpr uint8 kOpFirstLower = 0x20;
+  static constexpr uint8 kOpAllUpper = 0x60;
 
-  static const int kMaxSegmentLen     = 0x1f;
+  static constexpr int kMaxSegmentLen = 0x1f;
 
   void AddChar(const char desired) {
     ++segment_len_;