This commit is contained in:
Timur A. Fatkhullin
2025-02-20 23:56:25 +03:00
parent b6161ed03f
commit aca8a6523e
4 changed files with 117 additions and 24 deletions

View File

@@ -438,6 +438,9 @@ protected:
idx = std::distance(other._endpoint.c_str(), other._path.data());
_path = std::string_view(_endpoint.c_str() + idx, other._path.size());
idx = std::distance(other._endpoint.c_str(), other._portView.data());
_portView = std::string_view(_endpoint.c_str() + idx, other._portView.size());
_port = other._port;
} else {
_isValid = false;
@@ -445,6 +448,7 @@ protected:
_proto = std::string_view();
_host = std::string_view();
_path = std::string_view();
_portView = std::string_view();
_port = -1;
}
}
@@ -461,12 +465,14 @@ protected:
_host = std::move(other._host);
_path = std::move(other._path);
_port = std::move(other._port);
_portView = std::move(other._portView);
} else {
_isValid = false;
_endpoint = std::string();
_proto = std::string_view();
_host = std::string_view();
_path = std::string_view();
_portView = std::string_view();
_port = -1;
}
}