aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJisi Liu <liujisi@google.com>2017-10-02 10:53:06 -0700
committerGitHub <noreply@github.com>2017-10-02 10:53:06 -0700
commitbd798dfc81443cb95ff3b6e0b787c92031b113e5 (patch)
tree9cba2959ba08be19835c18d9033c0c9153e6b694
parenta38f876d40128bb5a6264d5f3d2c27ab33bb89d8 (diff)
parent6d0cf1b3fe35909c22a1d3fc6d1e4d4ab3c02cf2 (diff)
downloadprotobuf-bd798dfc81443cb95ff3b6e0b787c92031b113e5.tar.gz
protobuf-bd798dfc81443cb95ff3b6e0b787c92031b113e5.tar.bz2
protobuf-bd798dfc81443cb95ff3b6e0b787c92031b113e5.zip
Merge pull request #3690 from pherl/3.4.x
Remove ranged based for in io_win32.cc
-rw-r--r--src/google/protobuf/stubs/io_win32.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/google/protobuf/stubs/io_win32.cc b/src/google/protobuf/stubs/io_win32.cc
index 51656a78..7e1cf785 100644
--- a/src/google/protobuf/stubs/io_win32.cc
+++ b/src/google/protobuf/stubs/io_win32.cc
@@ -195,12 +195,12 @@ string normalize(string path) {
// Join all segments.
bool first = true;
std::ostringstream result;
- for (const auto& s : segments) {
+ for (int i = 0; i < segments.size(); ++i) {
if (!first) {
result << '\\';
}
first = false;
- result << s;
+ result << segments[i];
}
// Preserve trailing separator if the input contained it.
if (!path.empty() && is_separator(path[path.size() - 1])) {