SUNET icon indicating copy to clipboard operation
SUNET copied to clipboard

use const arguments

Open paulpach opened this issue 7 years ago • 0 comments

I found this code:

 int HttpParser::_parse_desc(char* recv_buf, Request& request) {

If I am reading the code correctly you never modify the contents of recv_buf, so it should be:

 int HttpParser::_parse_desc(const char* recv_buf, Request& request) {

I would also consider using std::string instead.

paulpach avatar Jun 15 '17 15:06 paulpach