Skip to content

Commit d22ee2c

Browse files
tniessentargos
authored andcommitted
url: use foreach-style C++ loop
PR-URL: #23138 Reviewed-By: Refael Ackermann <[email protected]> Reviewed-By: Tiancheng "Timothy" Gu <[email protected]> Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Joyee Cheung <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Sakthipriyan Vairamani <[email protected]>
1 parent 54ca0e1 commit d22ee2c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/node_url.h

+2-3
Original file line numberDiff line numberDiff line change
@@ -159,9 +159,8 @@ class URL {
159159

160160
std::string path() const {
161161
std::string ret;
162-
for (auto i = context_.path.begin(); i != context_.path.end(); i++) {
163-
ret += '/';
164-
ret += *i;
162+
for (const std::string& element : context_.path) {
163+
ret += '/' + element;
165164
}
166165
return ret;
167166
}

0 commit comments

Comments
 (0)