SUNET icon indicating copy to clipboard operation
SUNET copied to clipboard

return values

Open paulpach opened this issue 7 years ago • 0 comments

This code:

void HttpParser::encode(const std::string &URL, std::string& result) {
   ...
   result = "...";
}

would be much more readable and easier to use like this:

std::string HttpParser::encode(const std::string &URL) {
   ...
   return "...";
}   

If you are worrying about object copies being made, don't: https://www.scribd.com/document/316704010/Want-Speed-Pass-by-Value

paulpach avatar Jun 15 '17 13:06 paulpach