aboutsummaryrefslogtreecommitdiff
path: root/zenhttp/httpasio.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'zenhttp/httpasio.cpp')
-rw-r--r--zenhttp/httpasio.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/zenhttp/httpasio.cpp b/zenhttp/httpasio.cpp
index f47daf3cf..b9db108db 100644
--- a/zenhttp/httpasio.cpp
+++ b/zenhttp/httpasio.cpp
@@ -1112,7 +1112,7 @@ HttpAsioServerImpl::RegisterService(const char* InUrlPath, HttpService& Service)
{
std::string_view UrlPath(InUrlPath);
Service.SetUriPrefixLength(UrlPath.size());
- if (!UrlPath.empty() && UrlPath[UrlPath.size() - 1] == '/')
+ if (!UrlPath.empty() && UrlPath.back() == '/')
{
UrlPath.remove_suffix(1);
}
@@ -1131,7 +1131,7 @@ HttpAsioServerImpl::RouteRequest(std::string_view Url)
for (const ServiceEntry& SvcEntry : m_UriHandlers)
{
const std::string& SvcUrl = SvcEntry.ServiceUrlPath;
- std::string::size_type SvcUrlSize = SvcUrl.size();
+ const std::string::size_type SvcUrlSize = SvcUrl.size();
if ((SvcUrlSize >= CandidateMatchSize) &&
Url.compare(0, SvcUrlSize, SvcUrl) == 0 &&
((SvcUrlSize == Url.size()) || (Url[SvcUrlSize] == '/')))