THRIFT-1165 Missing parameter names for C++ oneway stubs
Patch: David Nadlinger


git-svn-id: https://svn.apache.org/repos/asf/thrift/trunk@1129907 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 298dd8c..8fb3e64 100644
--- a/compiler/cpp/src/generate/t_cpp_generator.cc
+++ b/compiler/cpp/src/generate/t_cpp_generator.cc
@@ -929,7 +929,7 @@
         indent() <<
         indent() << "__isset." << (*m_iter)->get_name() << " = true;" << endl;
     }
-    out << 
+    out <<
       indent()<< "}" << endl;
   }
   out << endl;
@@ -2827,13 +2827,15 @@
       out <<
         indent() << "template <class Protocol_>" << endl;
     }
+    const bool unnamed_oprot_seqid = tfunction->is_oneway() &&
+      !(gen_templates_ && !specialized);
     out <<
       "void " << tservice->get_name() << "Processor" << class_suffix << "::" <<
       "process_" << tfunction->get_name() << "(" <<
-      "int32_t" << (tfunction->is_oneway() ? ", " : " seqid, ") <<
+      "int32_t" << (unnamed_oprot_seqid ? ", " : " seqid, ") <<
       prot_type << "* iprot, " <<
-      prot_type << "*" << (tfunction->is_oneway() ? ", " : " oprot, ")
-      << "void* callContext)" << endl;
+      prot_type << "*" << (unnamed_oprot_seqid ? ", " : " oprot, ") <<
+      "void* callContext)" << endl;
     scope_up(out);
 
     if (gen_templates_ && !specialized) {