aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/generator_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/generator_helpers.h')
-rw-r--r--src/compiler/generator_helpers.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/compiler/generator_helpers.h b/src/compiler/generator_helpers.h
index 53391bc41a..9a88c2bfcc 100644
--- a/src/compiler/generator_helpers.h
+++ b/src/compiler/generator_helpers.h
@@ -253,7 +253,8 @@ inline void GetComment(const grpc::protobuf::FileDescriptor *desc,
inline grpc::string GenerateCommentsWithPrefix(
const std::vector<grpc::string> &in, const grpc::string &prefix) {
std::ostringstream oss;
- for (const grpc::string &elem : in) {
+ for (auto it = in.begin(); it != in.end(); it++) {
+ const grpc::string& elem = *it;
if (elem.empty()) {
oss << prefix << "\n";
} else if (elem[0] == ' ') {