SUNET
SUNET copied to clipboard
use const arguments
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.