szaszm commented on a change in pull request #1046: URL: https://github.com/apache/nifi-minifi-cpp/pull/1046#discussion_r619191499
########## File path: libminifi/include/RemoteProcessorGroupPort.h ########## @@ -147,22 +147,16 @@ class RemoteProcessorGroupPort : public core::Processor { void setURL(std::string val) { auto urls = utils::StringUtils::split(val, ","); for (auto url : urls) { - logger_->log_trace("Parsing %s", url); - std::string host, protocol; - int port = -1; - url = utils::StringUtils::trim(url); - utils::parse_url(&url, &host, &port, &protocol); - logger_->log_trace("Parsed -%s- %s %s, %d", url, protocol, host, port); - if (port == -1) { - if (protocol.find("https") != std::string::npos) { - port = 443; - } else if (protocol.find("http") != std::string::npos) { - port = 80; - } + utils::URL parsed_url{utils::StringUtils::trim(url)}; Review comment: It looks like the loop variable is no longer mutated and can be changed for `const&` to avoid string copies. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org