diff --git a/src/node_url.h b/src/node_url.h index 5e61aee4efbd5a..d6e54d26d40392 100644 --- a/src/node_url.h +++ b/src/node_url.h @@ -159,9 +159,9 @@ class URL { std::string path() const { std::string ret; - for (auto i = context_.path.begin(); i != context_.path.end(); i++) { + for (const auto& i : context_.path) { ret += '/'; - ret += *i; + ret += i; } return ret; }