From bcad6b44b635ffdf41c614f64b69ce110e7906be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Thu, 27 Sep 2018 21:52:18 +0200 Subject: [PATCH 1/3] url: use foreach-style C++ loop --- src/node_url.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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; } From 2440d9c5015c2c22ce3521e6ab3491e815c200a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Fri, 28 Sep 2018 11:37:22 +0200 Subject: [PATCH 2/3] fixup! url: use foreach-style C++ loop --- src/node_url.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/node_url.h b/src/node_url.h index d6e54d26d40392..be3df7a91dc562 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 (const auto& i : context_.path) { - ret += '/'; - ret += i; + for (const std::string& i : context_.path) { + ret += '/' + i; } return ret; } From b0eb933e846d32b1ae3ccff0d8cc71d24aaaf0a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Tobias=20Nie=C3=9Fen?= Date: Fri, 28 Sep 2018 12:15:00 +0200 Subject: [PATCH 3/3] fixup! url: use foreach-style C++ loop --- src/node_url.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/node_url.h b/src/node_url.h index be3df7a91dc562..055393d22e0f19 100644 --- a/src/node_url.h +++ b/src/node_url.h @@ -159,8 +159,8 @@ class URL { std::string path() const { std::string ret; - for (const std::string& i : context_.path) { - ret += '/' + i; + for (const std::string& element : context_.path) { + ret += '/' + element; } return ret; }