summaryrefslogtreecommitdiff
path: root/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/cpp/src/thrift/generate/t_cpp_generator.cc')
-rw-r--r--compiler/cpp/src/thrift/generate/t_cpp_generator.cc28
1 files changed, 15 insertions, 13 deletions
diff --git a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
index d9898b7c5..0420e62e7 100644
--- a/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/thrift/generate/t_cpp_generator.cc
@@ -689,7 +689,7 @@ void t_cpp_generator::generate_enum_to_string_helper_function(std::ostream& out,
out << tenum->get_name() << "::type&";
}
out << " val) " ;
- scope_up(out);
+ scope_up(out);
out << indent() << "std::map<int, const char*>::const_iterator it = _"
<< tenum->get_name() << "_VALUES_TO_NAMES.find(val);" << endl;
@@ -1221,7 +1221,7 @@ void t_cpp_generator::generate_struct_declaration(ostream& out,
// Declare all fields
for (m_iter = members.begin(); m_iter != members.end(); ++m_iter) {
- generate_java_doc(out, *m_iter);
+ generate_java_doc(out, *m_iter);
indent(out) << declare_field(*m_iter,
false,
(pointers && !(*m_iter)->get_type()->is_xception()),
@@ -2475,11 +2475,11 @@ void t_cpp_generator::generate_service_client(t_service* tservice, string style)
indent_up();
if (style != "Cob") {
f_header_ << indent() << service_name_ << style << "Client" << short_suffix << "(" << prot_ptr
- << " prot";
- if (style == "Concurrent") {
- f_header_ << ", std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync";
- }
- f_header_ << ") ";
+ << " prot";
+ if (style == "Concurrent") {
+ f_header_ << ", std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync";
+ }
+ f_header_ << ") ";
if (extends.empty()) {
if (style == "Concurrent") {
@@ -2498,12 +2498,12 @@ void t_cpp_generator::generate_service_client(t_service* tservice, string style)
}
f_header_ << indent() << service_name_ << style << "Client" << short_suffix << "(" << prot_ptr
- << " iprot, " << prot_ptr << " oprot";
- if (style == "Concurrent") {
- f_header_ << ", std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync";
- }
- f_header_ << ") ";
-
+ << " iprot, " << prot_ptr << " oprot";
+ if (style == "Concurrent") {
+ f_header_ << ", std::shared_ptr< ::apache::thrift::async::TConcurrentClientSyncInfo> sync";
+ }
+ f_header_ << ") ";
+
if (extends.empty()) {
if (style == "Concurrent") {
f_header_ << ": sync_(sync)" << endl;
@@ -4660,6 +4660,8 @@ string t_cpp_generator::type_to_enum(t_type* type) {
return "::apache::thrift::protocol::T_I64";
case t_base_type::TYPE_DOUBLE:
return "::apache::thrift::protocol::T_DOUBLE";
+ default:
+ break;
}
} else if (type->is_enum()) {
return "::apache::thrift::protocol::T_I32";