Remove an unnecessary "else" from the generated Thrift code.
The "if" block here always results in a return (or an exception),
so there is no need for an "else". We can just put the rest of the code
under the "if" block. This actually makes a little more sense because
the "if" block here is an exceptional case.
Also deleted a stale comment.
Reviewed By: lhastings
Test Plan: diff'ed the old and new code.
git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@665580 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/compiler/cpp/src/generate/t_cpp_generator.cc b/compiler/cpp/src/generate/t_cpp_generator.cc
index 9fee1bd..ef16243 100644
--- a/compiler/cpp/src/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/generate/t_cpp_generator.cc
@@ -1970,12 +1970,8 @@
indent() << " return " << extends << "Processor::process_fn(iprot, oprot, fname, seqid);" << endl;
}
f_service_ <<
- indent() << "} else {" << endl <<
- indent() << " (this->*(pfn->second))(seqid, iprot, oprot);" << endl <<
- indent() << "}" << endl;
-
- // Read end of args field, the T_STOP, and the struct close
- f_service_ <<
+ indent() << "}" << endl <<
+ indent() << "(this->*(pfn->second))(seqid, iprot, oprot);" << endl <<
indent() << "return true;" << endl;
indent_down();