summaryrefslogtreecommitdiff
path: root/test/http/router_test.cpp
diff options
context:
space:
mode:
authorEd Tanous <edtanous@google.com>2023-02-16 21:28:44 +0300
committerEd Tanous <ed@tanous.net>2023-02-24 20:21:14 +0300
commit26ccae32112679c4653c1e3f8a1203c828bea05c (patch)
treea87d5056294e163b9ddeed9e867bcfb0750a8bb5 /test/http/router_test.cpp
parent7da1c58890e82194ff83ca6c8d55b5c327f2444a (diff)
downloadbmcweb-26ccae32112679c4653c1e3f8a1203c828bea05c.tar.xz
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
Diffstat (limited to 'test/http/router_test.cpp')
-rw-r--r--test/http/router_test.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/http/router_test.cpp b/test/http/router_test.cpp
index 9b5d9bec98..79320f7e04 100644
--- a/test/http/router_test.cpp
+++ b/test/http/router_test.cpp
@@ -36,7 +36,7 @@ TEST(Router, AllowHeader)
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 @@ TEST(Router, 404)
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 @@ TEST(Router, 405)
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};