Fixing code formatting issues

This commit is contained in:
Andrew Spiering 2017-01-11 11:18:53 -08:00
parent effcb132e1
commit 75ac3973ef
2 changed files with 5 additions and 14 deletions

View File

@ -122,19 +122,11 @@ void FieldGeneratorBase::GenerateCodecCode(io::Printer* printer) {
}
void FieldGeneratorBase::AddDeprecatedFlag(io::Printer* printer) {
if (descriptor_->options().deprecated())
{
if (descriptor_->options().deprecated()) {
printer->Print("[global::System.ObsoleteAttribute]\n");
} else if (descriptor_->type() == FieldDescriptor::TYPE_MESSAGE &&
descriptor_->message_type()->options().deprecated()) {
printer->Print("[global::System.ObsoleteAttribute]\n");
}
else
{
if (descriptor_->type() == FieldDescriptor::TYPE_MESSAGE)
{
if (descriptor_->message_type()->options().deprecated())
{
printer->Print("[global::System.ObsoleteAttribute]\n");
}
}
}
}

View File

@ -99,8 +99,7 @@ const std::vector<const FieldDescriptor*>& MessageGenerator::fields_by_number()
}
void MessageGenerator::AddDeprecatedFlag(io::Printer* printer) {
if (descriptor_->options().deprecated())
{
if (descriptor_->options().deprecated()) {
printer->Print("[global::System.ObsoleteAttribute]\n");
}
}