Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

no case in switch #247

Closed
liyujun opened this issue Mar 17, 2015 · 1 comment
Closed

no case in switch #247

liyujun opened this issue Mar 17, 2015 · 1 comment

Comments

@liyujun
Copy link

liyujun commented Mar 17, 2015

file: protobuf/src/google/protobuf/compiler/cpp/cpp_message.cc

void MessageGenerator::GenerateClassDefinition(io::Printer* printer)
{
....
uses_string_ = false;
for (int i = 0; i < descriptors.size(); i++) {
const FieldDescriptor* field = descriptors[i];
if (field->cpp_type() == FieldDescriptor::CPPTYPE_STRING) {
switch (field->options().ctype()) {
default: uses_string_ = true; break;
}
}
}
....
}

@liujisi
Copy link
Contributor

liujisi commented Mar 20, 2015

If this is from a warning, please safely ignore it. There are cases in the internal version of protobufs that deals with different ctypes. Unfortunately due to dependency issues, these ctype implementations haven't been opensourced yet, thus the code is currently stripped out.

@liujisi liujisi closed this as completed Mar 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants