tidy: add clang-tidy modernize-use-starts-ends-with check

This commit is contained in:
Roman Zeyde
2024-09-06 23:07:46 +03:00
parent 2756797eca
commit fc7b507e9a
4 changed files with 4 additions and 3 deletions

View File

@@ -315,7 +315,7 @@ static void http_request_cb(struct evhttp_request* req, void* arg)
if (i->exactMatch)
match = (strURI == i->prefix);
else
match = (strURI.substr(0, i->prefix.size()) == i->prefix);
match = strURI.starts_with(i->prefix);
if (match) {
path = strURI.substr(i->prefix.size());
break;