aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/ruby_generator_helpers-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/ruby_generator_helpers-inl.h')
-rw-r--r--src/compiler/ruby_generator_helpers-inl.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/compiler/ruby_generator_helpers-inl.h b/src/compiler/ruby_generator_helpers-inl.h
index 67a5eedd09..8263e353b2 100644
--- a/src/compiler/ruby_generator_helpers-inl.h
+++ b/src/compiler/ruby_generator_helpers-inl.h
@@ -47,8 +47,9 @@ inline bool ServicesFilename(const google::protobuf::FileDescriptor* file,
static const unsigned proto_suffix_length = 6; // length of ".proto"
if (file->name().size() > proto_suffix_length &&
file->name().find_last_of(".proto") == file->name().size() - 1) {
- *file_name_or_error = file->name().substr(
- 0, file->name().size() - proto_suffix_length) + "_services.rb";
+ *file_name_or_error =
+ file->name().substr(0, file->name().size() - proto_suffix_length) +
+ "_services.rb";
return true;
} else {
*file_name_or_error = "Invalid proto file name: must end with .proto";
@@ -56,7 +57,8 @@ inline bool ServicesFilename(const google::protobuf::FileDescriptor* file,
}
}
-inline string MessagesRequireName(const google::protobuf::FileDescriptor* file) {
+inline string MessagesRequireName(
+ const google::protobuf::FileDescriptor* file) {
return Replace(file->name(), ".proto", "");
}