Unverified Commit 82724e21 authored by Jisi Liu's avatar Jisi Liu Committed by GitHub

Merge pull request #4042 from pherl/cpp_enum

Use matching enum type for IsPOD.
parents 8521624e 7ef21dd8
...@@ -113,16 +113,16 @@ struct ExtensionRangeSorter { ...@@ -113,16 +113,16 @@ struct ExtensionRangeSorter {
bool IsPOD(const FieldDescriptor* field) { bool IsPOD(const FieldDescriptor* field) {
if (field->is_repeated() || field->is_extension()) return false; if (field->is_repeated() || field->is_extension()) return false;
switch (field->cpp_type()) { switch (field->cpp_type()) {
case internal::WireFormatLite::CPPTYPE_ENUM: case FieldDescriptor::CPPTYPE_ENUM:
case internal::WireFormatLite::CPPTYPE_INT32: case FieldDescriptor::CPPTYPE_INT32:
case internal::WireFormatLite::CPPTYPE_INT64: case FieldDescriptor::CPPTYPE_INT64:
case internal::WireFormatLite::CPPTYPE_UINT32: case FieldDescriptor::CPPTYPE_UINT32:
case internal::WireFormatLite::CPPTYPE_UINT64: case FieldDescriptor::CPPTYPE_UINT64:
case internal::WireFormatLite::CPPTYPE_FLOAT: case FieldDescriptor::CPPTYPE_FLOAT:
case internal::WireFormatLite::CPPTYPE_DOUBLE: case FieldDescriptor::CPPTYPE_DOUBLE:
case internal::WireFormatLite::CPPTYPE_BOOL: case FieldDescriptor::CPPTYPE_BOOL:
return true; return true;
case internal::WireFormatLite::CPPTYPE_STRING: case FieldDescriptor::CPPTYPE_STRING:
return false; return false;
default: default:
return false; return false;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment