Перепись с const std::string& на std::string_view

This commit is contained in:
2026-01-29 18:45:16 +03:00
parent 9a7c9b7e7c
commit 3f77cdc2bd
3 changed files with 8 additions and 9 deletions
+3 -4
View File
@@ -166,13 +166,12 @@ public:
{
namespace urls = boost::urls;
const std::string& route = req.target();
const bool is_match_route = routes_pathes_.count(route);
const bool is_match_route = routes_pathes_.count(req.target());
if (is_match_route)
{
std::optional<std::shared_ptr<IRouteExecutor>> maybe_executor_ptr = routes_pathes_
.at(route)
.at(req.target())
->FindExecutor(req.method());
if (maybe_executor_ptr.has_value())
@@ -192,7 +191,7 @@ public:
}
}
urls::url_view parsed_view = urls::parse_uri_reference(route).value();
urls::url_view parsed_view = urls::parse_uri_reference(req.target()).value();
auto segs = parsed_view.segments();
std::vector<std::string> parts;