diff options
author | Jisi Liu <liujisi@google.com> | 2017-12-13 13:29:18 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-12-13 13:29:18 -0800 |
commit | 82724e21098fbd02893811c79db4e5e95310ba0f (patch) | |
tree | aa8fbd176fc6992a54434293708d202fb0989ce6 /src | |
parent | 8521624e935925d60204ebecee319f1df7423b71 (diff) | |
parent | 7ef21dd81bb1841ea5fa44e9d26e2b23b1bf1468 (diff) | |
download | protobuf-82724e21098fbd02893811c79db4e5e95310ba0f.tar.gz protobuf-82724e21098fbd02893811c79db4e5e95310ba0f.tar.bz2 protobuf-82724e21098fbd02893811c79db4e5e95310ba0f.zip |
Merge pull request #4042 from pherl/cpp_enum
Use matching enum type for IsPOD.
Diffstat (limited to 'src')
-rw-r--r-- | src/google/protobuf/compiler/cpp/cpp_message.cc | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/google/protobuf/compiler/cpp/cpp_message.cc b/src/google/protobuf/compiler/cpp/cpp_message.cc index 60467598..34a70b12 100644 --- a/src/google/protobuf/compiler/cpp/cpp_message.cc +++ b/src/google/protobuf/compiler/cpp/cpp_message.cc @@ -113,16 +113,16 @@ struct ExtensionRangeSorter { bool IsPOD(const FieldDescriptor* field) { if (field->is_repeated() || field->is_extension()) return false; switch (field->cpp_type()) { - case internal::WireFormatLite::CPPTYPE_ENUM: - case internal::WireFormatLite::CPPTYPE_INT32: - case internal::WireFormatLite::CPPTYPE_INT64: - case internal::WireFormatLite::CPPTYPE_UINT32: - case internal::WireFormatLite::CPPTYPE_UINT64: - case internal::WireFormatLite::CPPTYPE_FLOAT: - case internal::WireFormatLite::CPPTYPE_DOUBLE: - case internal::WireFormatLite::CPPTYPE_BOOL: + case FieldDescriptor::CPPTYPE_ENUM: + case FieldDescriptor::CPPTYPE_INT32: + case FieldDescriptor::CPPTYPE_INT64: + case FieldDescriptor::CPPTYPE_UINT32: + case FieldDescriptor::CPPTYPE_UINT64: + case FieldDescriptor::CPPTYPE_FLOAT: + case FieldDescriptor::CPPTYPE_DOUBLE: + case FieldDescriptor::CPPTYPE_BOOL: return true; - case internal::WireFormatLite::CPPTYPE_STRING: + case FieldDescriptor::CPPTYPE_STRING: return false; default: return false; |