summaryrefslogtreecommitdiff
path: root/icespider/testing/testRequest.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2019-11-12 16:16:37 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2019-11-12 16:16:37 +0000
commit6bdc9fe7ff98f6d76fc9f959b8c39e993a064216 (patch)
treed7d444fd5c0b3385ca18a85b65ffef7835c0e268 /icespider/testing/testRequest.cpp
parentModernize build (diff)
downloadicespider-6bdc9fe7ff98f6d76fc9f959b8c39e993a064216.tar.bz2
icespider-6bdc9fe7ff98f6d76fc9f959b8c39e993a064216.tar.xz
icespider-6bdc9fe7ff98f6d76fc9f959b8c39e993a064216.zip
Performance fixesicespider-0.6.2
Diffstat (limited to 'icespider/testing/testRequest.cpp')
-rw-r--r--icespider/testing/testRequest.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/icespider/testing/testRequest.cpp b/icespider/testing/testRequest.cpp
index b866308..080c07e 100644
--- a/icespider/testing/testRequest.cpp
+++ b/icespider/testing/testRequest.cpp
@@ -4,6 +4,7 @@
#include <formatters.h>
namespace IceSpider {
+ constexpr std::string_view slash("/");
TestRequest::TestRequest(const Core * c, HttpMethod m, const std::string_view & p) :
IHttpRequest(c),
method(m)
@@ -13,7 +14,7 @@ namespace IceSpider {
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
if (!path.empty()) {
// NOLINTNEXTLINE(clang-analyzer-cplusplus.NewDeleteLeaks)
- ba::split(url, path, ba::is_any_of("/"), ba::token_compress_off);
+ ba::split(url, path, ba::is_any_of(slash), ba::token_compress_off);
}
}