diff options
author | Masood Malekghassemi <atash@google.com> | 2016-07-01 11:58:04 -0700 |
---|---|---|
committer | Masood Malekghassemi <atash@google.com> | 2016-07-12 13:20:39 -0700 |
commit | ac59245624c7681b54ce30a9b0a073f645cce014 (patch) | |
tree | 9e249870e9e3908af0f0425ba3126bbc6f952e26 /src/compiler/generator_helpers.h | |
parent | 1fa0faa2e2c001691a9c76f6362fe6a2d5a6b849 (diff) |
Clang-format all the things
Diffstat (limited to 'src/compiler/generator_helpers.h')
-rw-r--r-- | src/compiler/generator_helpers.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h index 9a88c2bfcc..88d96c0080 100644 --- a/src/compiler/generator_helpers.h +++ b/src/compiler/generator_helpers.h @@ -84,7 +84,7 @@ inline grpc::string StringReplace(grpc::string str, const grpc::string &from, } str.replace(pos, from.length(), to); pos += to.length(); - } while(replace_all); + } while (replace_all); return str; } @@ -139,8 +139,8 @@ inline grpc::string LowerUnderscoreToUpperCamel(grpc::string str) { return result; } -inline grpc::string FileNameInUpperCamel(const grpc::protobuf::FileDescriptor *file, - bool include_package_path) { +inline grpc::string FileNameInUpperCamel( + const grpc::protobuf::FileDescriptor *file, bool include_package_path) { std::vector<grpc::string> tokens = tokenize(StripProto(file->name()), "/"); grpc::string result = ""; if (include_package_path) { @@ -152,7 +152,8 @@ inline grpc::string FileNameInUpperCamel(const grpc::protobuf::FileDescriptor *f return result; } -inline grpc::string FileNameInUpperCamel(const grpc::protobuf::FileDescriptor *file) { +inline grpc::string FileNameInUpperCamel( + const grpc::protobuf::FileDescriptor *file) { return FileNameInUpperCamel(file, true); } @@ -163,7 +164,8 @@ enum MethodType { METHODTYPE_BIDI_STREAMING }; -inline MethodType GetMethodType(const grpc::protobuf::MethodDescriptor *method) { +inline MethodType GetMethodType( + const grpc::protobuf::MethodDescriptor *method) { if (method->client_streaming()) { if (method->server_streaming()) { return METHODTYPE_BIDI_STREAMING; @@ -254,7 +256,7 @@ inline grpc::string GenerateCommentsWithPrefix( const std::vector<grpc::string> &in, const grpc::string &prefix) { std::ostringstream oss; for (auto it = in.begin(); it != in.end(); it++) { - const grpc::string& elem = *it; + const grpc::string &elem = *it; if (elem.empty()) { oss << prefix << "\n"; } else if (elem[0] == ' ') { |