Pass string views by value
string_view should always be passed by value; This commit is a sed
replace of the code to make all string_views pass by value, per general
coding guidelines[1].
[1] https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I55b342a29a0fbfce0a4ed9ea63db6014d03b134c
diff --git a/test/http/router_test.cpp b/test/http/router_test.cpp
index 9b5d9be..79320f7 100644
--- a/test/http/router_test.cpp
+++ b/test/http/router_test.cpp
@@ -36,7 +36,7 @@
Router router;
std::error_code ec;
- constexpr const std::string_view url = "/foo";
+ constexpr std::string_view url = "/foo";
Request req{{boost::beast::http::verb::get, url, 11}, ec};
@@ -75,7 +75,7 @@
Router router;
std::error_code ec;
- constexpr const std::string_view url = "/foo/bar";
+ constexpr std::string_view url = "/foo/bar";
Request req{{boost::beast::http::verb::get, url, 11}, ec};
@@ -105,7 +105,7 @@
Router router;
std::error_code ec;
- constexpr const std::string_view url = "/foo/bar";
+ constexpr std::string_view url = "/foo/bar";
Request req{{boost::beast::http::verb::patch, url, 11}, ec};