Removed whitespace before asterisk

pull/19788/head
Christian Maurer 5 years ago
parent 46dddacdf3
commit 33b8b3f998
  1. 8
      src/compiler/cpp_generator.cc
  2. 40
      test/cpp/codegen/compiler_test_golden

@ -896,7 +896,7 @@ void PrintHeaderServerMethodAsync(grpc_generator::Printer* printer,
"class WithAsyncMethod_$Method$ : public BaseClass {\n"); "class WithAsyncMethod_$Method$ : public BaseClass {\n");
printer->Print( printer->Print(
" private:\n" " private:\n"
" void BaseClassMustBeDerivedFromService(const Service * /*service*/) " " void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n"); "{}\n");
printer->Print(" public:\n"); printer->Print(" public:\n");
printer->Indent(); printer->Indent();
@ -1007,7 +1007,7 @@ void PrintHeaderServerMethodCallback(
"class ExperimentalWithCallbackMethod_$Method$ : public BaseClass {\n"); "class ExperimentalWithCallbackMethod_$Method$ : public BaseClass {\n");
printer->Print( printer->Print(
" private:\n" " private:\n"
" void BaseClassMustBeDerivedFromService(const Service * /*service*/) " " void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n"); "{}\n");
printer->Print(" public:\n"); printer->Print(" public:\n");
printer->Indent(); printer->Indent();
@ -1082,7 +1082,7 @@ void PrintHeaderServerMethodRawCallback(
"BaseClass {\n"); "BaseClass {\n");
printer->Print( printer->Print(
" private:\n" " private:\n"
" void BaseClassMustBeDerivedFromService(const Service * /*service*/) " " void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n"); "{}\n");
printer->Print(" public:\n"); printer->Print(" public:\n");
printer->Indent(); printer->Indent();
@ -1322,7 +1322,7 @@ void PrintHeaderServerMethodRaw(grpc_generator::Printer* printer,
printer->Print(*vars, "class WithRawMethod_$Method$ : public BaseClass {\n"); printer->Print(*vars, "class WithRawMethod_$Method$ : public BaseClass {\n");
printer->Print( printer->Print(
" private:\n" " private:\n"
" void BaseClassMustBeDerivedFromService(const Service * /*service*/) " " void BaseClassMustBeDerivedFromService(const Service* /*service*/) "
"{}\n"); "{}\n");
printer->Print(" public:\n"); printer->Print(" public:\n");
printer->Indent(); printer->Indent();

@ -252,7 +252,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class WithAsyncMethod_MethodA1 : public BaseClass { class WithAsyncMethod_MethodA1 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithAsyncMethod_MethodA1() { WithAsyncMethod_MethodA1() {
::grpc::Service::MarkMethodAsync(0); ::grpc::Service::MarkMethodAsync(0);
@ -272,7 +272,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class WithAsyncMethod_MethodA2 : public BaseClass { class WithAsyncMethod_MethodA2 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithAsyncMethod_MethodA2() { WithAsyncMethod_MethodA2() {
::grpc::Service::MarkMethodAsync(1); ::grpc::Service::MarkMethodAsync(1);
@ -292,7 +292,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class WithAsyncMethod_MethodA3 : public BaseClass { class WithAsyncMethod_MethodA3 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithAsyncMethod_MethodA3() { WithAsyncMethod_MethodA3() {
::grpc::Service::MarkMethodAsync(2); ::grpc::Service::MarkMethodAsync(2);
@ -312,7 +312,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class WithAsyncMethod_MethodA4 : public BaseClass { class WithAsyncMethod_MethodA4 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithAsyncMethod_MethodA4() { WithAsyncMethod_MethodA4() {
::grpc::Service::MarkMethodAsync(3); ::grpc::Service::MarkMethodAsync(3);
@ -333,7 +333,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodA1 : public BaseClass { class ExperimentalWithCallbackMethod_MethodA1 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithCallbackMethod_MethodA1() { ExperimentalWithCallbackMethod_MethodA1() {
::grpc::Service::experimental().MarkMethodCallback(0, ::grpc::Service::experimental().MarkMethodCallback(0,
@ -364,7 +364,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodA2 : public BaseClass { class ExperimentalWithCallbackMethod_MethodA2 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithCallbackMethod_MethodA2() { ExperimentalWithCallbackMethod_MethodA2() {
::grpc::Service::experimental().MarkMethodCallback(1, ::grpc::Service::experimental().MarkMethodCallback(1,
@ -386,7 +386,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodA3 : public BaseClass { class ExperimentalWithCallbackMethod_MethodA3 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithCallbackMethod_MethodA3() { ExperimentalWithCallbackMethod_MethodA3() {
::grpc::Service::experimental().MarkMethodCallback(2, ::grpc::Service::experimental().MarkMethodCallback(2,
@ -408,7 +408,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodA4 : public BaseClass { class ExperimentalWithCallbackMethod_MethodA4 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithCallbackMethod_MethodA4() { ExperimentalWithCallbackMethod_MethodA4() {
::grpc::Service::experimental().MarkMethodCallback(3, ::grpc::Service::experimental().MarkMethodCallback(3,
@ -499,7 +499,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class WithRawMethod_MethodA1 : public BaseClass { class WithRawMethod_MethodA1 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithRawMethod_MethodA1() { WithRawMethod_MethodA1() {
::grpc::Service::MarkMethodRaw(0); ::grpc::Service::MarkMethodRaw(0);
@ -519,7 +519,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class WithRawMethod_MethodA2 : public BaseClass { class WithRawMethod_MethodA2 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithRawMethod_MethodA2() { WithRawMethod_MethodA2() {
::grpc::Service::MarkMethodRaw(1); ::grpc::Service::MarkMethodRaw(1);
@ -539,7 +539,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class WithRawMethod_MethodA3 : public BaseClass { class WithRawMethod_MethodA3 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithRawMethod_MethodA3() { WithRawMethod_MethodA3() {
::grpc::Service::MarkMethodRaw(2); ::grpc::Service::MarkMethodRaw(2);
@ -559,7 +559,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class WithRawMethod_MethodA4 : public BaseClass { class WithRawMethod_MethodA4 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithRawMethod_MethodA4() { WithRawMethod_MethodA4() {
::grpc::Service::MarkMethodRaw(3); ::grpc::Service::MarkMethodRaw(3);
@ -579,7 +579,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodA1 : public BaseClass { class ExperimentalWithRawCallbackMethod_MethodA1 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithRawCallbackMethod_MethodA1() { ExperimentalWithRawCallbackMethod_MethodA1() {
::grpc::Service::experimental().MarkMethodRawCallback(0, ::grpc::Service::experimental().MarkMethodRawCallback(0,
@ -604,7 +604,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodA2 : public BaseClass { class ExperimentalWithRawCallbackMethod_MethodA2 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithRawCallbackMethod_MethodA2() { ExperimentalWithRawCallbackMethod_MethodA2() {
::grpc::Service::experimental().MarkMethodRawCallback(1, ::grpc::Service::experimental().MarkMethodRawCallback(1,
@ -626,7 +626,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodA3 : public BaseClass { class ExperimentalWithRawCallbackMethod_MethodA3 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithRawCallbackMethod_MethodA3() { ExperimentalWithRawCallbackMethod_MethodA3() {
::grpc::Service::experimental().MarkMethodRawCallback(2, ::grpc::Service::experimental().MarkMethodRawCallback(2,
@ -648,7 +648,7 @@ class ServiceA final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodA4 : public BaseClass { class ExperimentalWithRawCallbackMethod_MethodA4 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithRawCallbackMethod_MethodA4() { ExperimentalWithRawCallbackMethod_MethodA4() {
::grpc::Service::experimental().MarkMethodRawCallback(3, ::grpc::Service::experimental().MarkMethodRawCallback(3,
@ -790,7 +790,7 @@ class ServiceB final {
template <class BaseClass> template <class BaseClass>
class WithAsyncMethod_MethodB1 : public BaseClass { class WithAsyncMethod_MethodB1 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithAsyncMethod_MethodB1() { WithAsyncMethod_MethodB1() {
::grpc::Service::MarkMethodAsync(0); ::grpc::Service::MarkMethodAsync(0);
@ -811,7 +811,7 @@ class ServiceB final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithCallbackMethod_MethodB1 : public BaseClass { class ExperimentalWithCallbackMethod_MethodB1 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithCallbackMethod_MethodB1() { ExperimentalWithCallbackMethod_MethodB1() {
::grpc::Service::experimental().MarkMethodCallback(0, ::grpc::Service::experimental().MarkMethodCallback(0,
@ -860,7 +860,7 @@ class ServiceB final {
template <class BaseClass> template <class BaseClass>
class WithRawMethod_MethodB1 : public BaseClass { class WithRawMethod_MethodB1 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
WithRawMethod_MethodB1() { WithRawMethod_MethodB1() {
::grpc::Service::MarkMethodRaw(0); ::grpc::Service::MarkMethodRaw(0);
@ -880,7 +880,7 @@ class ServiceB final {
template <class BaseClass> template <class BaseClass>
class ExperimentalWithRawCallbackMethod_MethodB1 : public BaseClass { class ExperimentalWithRawCallbackMethod_MethodB1 : public BaseClass {
private: private:
void BaseClassMustBeDerivedFromService(const Service * /*service*/) {} void BaseClassMustBeDerivedFromService(const Service* /*service*/) {}
public: public:
ExperimentalWithRawCallbackMethod_MethodB1() { ExperimentalWithRawCallbackMethod_MethodB1() {
::grpc::Service::experimental().MarkMethodRawCallback(0, ::grpc::Service::experimental().MarkMethodRawCallback(0,

Loading…
Cancel
Save