Skip to content

Commit

Permalink
url: use foreach-style C++ loop
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
tniessen authored and targos committed Oct 3, 2018
1 parent 54ca0e1 commit d22ee2c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/node_url.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,9 +159,8 @@ class URL {

std::string path() const {
std::string ret;
for (auto i = context_.path.begin(); i != context_.path.end(); i++) {
ret += '/';
ret += *i;
for (const std::string& element : context_.path) {
ret += '/' + element;
}
return ret;
}
Expand Down

0 comments on commit d22ee2c

Please sign in to comment.