Skip to content

Commit

Permalink
remove pointless &*
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Jul 15, 2022
1 parent 17740f8 commit 36ad8f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/futils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; // ://
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 36ad8f9

Please sign in to comment.