diff options
Diffstat (limited to 'src/compiler/cpp_generator_helpers.h')
-rw-r--r-- | src/compiler/cpp_generator_helpers.h | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/compiler/cpp_generator_helpers.h b/src/compiler/cpp_generator_helpers.h index 28606d46b8..b8efcbdb84 100644 --- a/src/compiler/cpp_generator_helpers.h +++ b/src/compiler/cpp_generator_helpers.h @@ -26,22 +26,22 @@ namespace grpc_cpp_generator { -inline grpc::string DotsToColons(const grpc::string &name) { +inline grpc::string DotsToColons(const grpc::string& name) { return grpc_generator::StringReplace(name, ".", "::"); } -inline grpc::string DotsToUnderscores(const grpc::string &name) { +inline grpc::string DotsToUnderscores(const grpc::string& name) { return grpc_generator::StringReplace(name, ".", "_"); } -inline grpc::string ClassName(const grpc::protobuf::Descriptor *descriptor, +inline grpc::string ClassName(const grpc::protobuf::Descriptor* descriptor, bool qualified) { // Find "outer", the descriptor of the top-level message in which // "descriptor" is embedded. - const grpc::protobuf::Descriptor *outer = descriptor; + const grpc::protobuf::Descriptor* outer = descriptor; while (outer->containing_type() != NULL) outer = outer->containing_type(); - const grpc::string &outer_name = outer->full_name(); + const grpc::string& outer_name = outer->full_name(); grpc::string inner_name = descriptor->full_name().substr(outer_name.size()); if (qualified) { @@ -54,7 +54,7 @@ inline grpc::string ClassName(const grpc::protobuf::Descriptor *descriptor, // Get leading or trailing comments in a string. Comment lines start with "// ". // Leading detached comments are put in in front of leading comments. template <typename DescriptorType> -inline grpc::string GetCppComments(const DescriptorType *desc, bool leading) { +inline grpc::string GetCppComments(const DescriptorType* desc, bool leading) { return grpc_generator::GetPrefixedComments(desc, leading, "//"); } |