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 <refack@gmail.com>
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
  • 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.