diff --git a/src/node_url.h b/src/node_url.h index 5e61aee4efbd5a..055393d22e0f19 100644 --- a/src/node_url.h +++ b/src/node_url.h @@ -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; }