davidmoreno / onion

C library to create simple HTTP servers and Web Applications.
http://www.coralbits.com/libonion/
Other
2.01k stars 250 forks source link

Change `const std::string` to `const std::string&` #302

Closed Bogdanisar closed 2 years ago

Bogdanisar commented 2 years ago

Hi, I ran Cppcheck for static code analysis on the project and noticed that we have these 4 parameters that are non-reference const objects even though we could use const reference types which might be more performant in the case of std::string. And looking at some other functions, it seems like const std::string& is preferred over const std::string in the rest of the project.