Skip to content

Commit db2225b

Browse files
committed
Remove redundant c_str() in set_path call
set_path takes const std::string&, so passing .c_str() forces an unnecessary temporary string construction.
1 parent 03cf1e7 commit db2225b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/webserver.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -922,7 +922,7 @@ MHD_Result webserver::finalize_answer(MHD_Connection* connection, struct details
922922
MHD_Result webserver::complete_request(MHD_Connection* connection, struct details::modded_request* mr, const char* version, const char* method) {
923923
mr->ws = this;
924924

925-
mr->dhr->set_path(mr->standardized_url.c_str());
925+
mr->dhr->set_path(mr->standardized_url);
926926
mr->dhr->set_method(method);
927927
mr->dhr->set_version(version);
928928

0 commit comments

Comments
 (0)