wgtmac commented on code in PR #3284:
URL: https://github.com/apache/avro/pull/3284#discussion_r1909836549
##########
lang/c++/impl/avrogencpp.cc:
##########
@@ -859,12 +869,19 @@ static string readGuard(const string &filename) {
string buf;
string candidate;
while (std::getline(ifs, buf)) {
- boost::algorithm::trim(buf);
+ if (!buf.empty()) {
+ size_t start = 0, end = buf.length();
+ while (start < end && std::isspace(buf[start])) start++;
+ while (start < end && std::isspace(buf[end - 1])) end--;
Review Comment:
I'm not sure if it is better to call `std::isspace(buf[start],
std::locale::classic())` instead of `std::isspace(static_cast<unsigned
char>(buf[start]))`
--
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]