From baa14a975ef92ee6fb301f0e684f56f18f2c55a7 Mon Sep 17 00:00:00 2001 From: Craig Tiller Date: Fri, 3 Nov 2017 09:09:36 -0700 Subject: Update clang-format to 5.0 --- src/compiler/php_generator_helpers.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'src/compiler/php_generator_helpers.h') diff --git a/src/compiler/php_generator_helpers.h b/src/compiler/php_generator_helpers.h index 3c886794b8..3ad1997764 100644 --- a/src/compiler/php_generator_helpers.h +++ b/src/compiler/php_generator_helpers.h @@ -27,14 +27,14 @@ namespace grpc_php_generator { inline grpc::string GetPHPServiceClassname( - const grpc::protobuf::ServiceDescriptor *service, - const grpc::string &class_suffix) { + const grpc::protobuf::ServiceDescriptor* service, + const grpc::string& class_suffix) { return service->name() + (class_suffix == "" ? "Client" : class_suffix); } // ReplaceAll replaces all instances of search with replace in s. -inline grpc::string ReplaceAll(grpc::string s, const grpc::string &search, - const grpc::string &replace) { +inline grpc::string ReplaceAll(grpc::string s, const grpc::string& search, + const grpc::string& replace) { size_t pos = 0; while ((pos = s.find(search, pos)) != grpc::string::npos) { s.replace(pos, search.length(), replace); @@ -44,9 +44,9 @@ inline grpc::string ReplaceAll(grpc::string s, const grpc::string &search, } inline grpc::string GetPHPServiceFilename( - const grpc::protobuf::FileDescriptor *file, - const grpc::protobuf::ServiceDescriptor *service, - const grpc::string &class_suffix) { + const grpc::protobuf::FileDescriptor* file, + const grpc::protobuf::ServiceDescriptor* service, + const grpc::string& class_suffix) { std::ostringstream oss; if (file->options().has_php_namespace()) { oss << ReplaceAll(file->options().php_namespace(), "\\", "/"); @@ -65,7 +65,7 @@ inline grpc::string GetPHPServiceFilename( // Get leading or trailing comments in a string. Comment lines start with "// ". // Leading detached comments are put in in front of leading comments. template -inline grpc::string GetPHPComments(const DescriptorType *desc, +inline grpc::string GetPHPComments(const DescriptorType* desc, grpc::string prefix) { return ReplaceAll(grpc_generator::GetPrefixedComments(desc, true, prefix), "*/", "*/"); -- cgit v1.2.3