From 5479792d50b6270622ed0d1cd4ba64e188cc49e2 Mon Sep 17 00:00:00 2001 From: Rosen Penev Date: Thu, 14 Jul 2022 19:43:29 -0700 Subject: [PATCH] remove pointless &* Signed-off-by: Rosen Penev --- src/futils.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/futils.cpp b/src/futils.cpp index 7d0ff577..1952120d 100644 --- a/src/futils.cpp +++ b/src/futils.cpp @@ -272,7 +272,7 @@ Uri Uri::Parse(const std::string& uri) { auto protocolEnd = std::find(protocolStart, uriEnd, ':'); //"://"); if (protocolEnd != uriEnd) { - std::string prot = &*(protocolEnd); + auto prot = std::string(protocolEnd, uriEnd); if ((prot.length() > 3) && (prot.substr(0, 3) == "://")) { result.Protocol = std::string(protocolStart, protocolEnd); protocolEnd += 3; // :// @@ -309,7 +309,7 @@ Uri Uri::Parse(const std::string& uri) { result.Host = std::string(hostStart, hostEnd); // port - if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) // we have a port + if ((hostEnd != uriEnd) && (*hostEnd == ':')) // we have a port { ++hostEnd; auto portEnd = (pathStart != uriEnd) ? pathStart : queryStart;