SolidWallOfCode commented on pull request #8638:
URL: https://github.com/apache/trafficserver/pull/8638#issuecomment-1026320489


   The original code is terrible, you should take this opportunity to fix it. 
Foremost, don't use `stringstream`.  Why not something like
   ```
   std::string out;
   out.reserve(in.size());
   size_t n = 0;
   for ( char c : in ) {
     if (!isspace(c)) { out << c;  ++n; }
   }
   out.resize(n);
   return out;
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to