remove pointless &*

Signed-off-by: Rosen Penev <rosenp@gmail.com>
main
Rosen Penev 3 years ago
parent f3b08d506e
commit 5479792d50

@ -272,7 +272,7 @@ Uri Uri::Parse(const std::string& uri) {
auto protocolEnd = std::find(protocolStart, uriEnd, ':'); //"://"); auto protocolEnd = std::find(protocolStart, uriEnd, ':'); //"://");
if (protocolEnd != uriEnd) { if (protocolEnd != uriEnd) {
std::string prot = &*(protocolEnd); auto prot = std::string(protocolEnd, uriEnd);
if ((prot.length() > 3) && (prot.substr(0, 3) == "://")) { if ((prot.length() > 3) && (prot.substr(0, 3) == "://")) {
result.Protocol = std::string(protocolStart, protocolEnd); result.Protocol = std::string(protocolStart, protocolEnd);
protocolEnd += 3; // :// protocolEnd += 3; // ://
@ -309,7 +309,7 @@ Uri Uri::Parse(const std::string& uri) {
result.Host = std::string(hostStart, hostEnd); result.Host = std::string(hostStart, hostEnd);
// port // port
if ((hostEnd != uriEnd) && ((&*(hostEnd))[0] == ':')) // we have a port if ((hostEnd != uriEnd) && (*hostEnd == ':')) // we have a port
{ {
++hostEnd; ++hostEnd;
auto portEnd = (pathStart != uriEnd) ? pathStart : queryStart; auto portEnd = (pathStart != uriEnd) ? pathStart : queryStart;

Loading…
Cancel
Save