Merge pull request #1233 from dosuperuser/improvement/optimizations

Minor C++ optimizations
This commit is contained in:
Adam Ierymenko 2020-11-24 19:24:36 -05:00 committed by GitHub
commit d64c5a92c6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 33 additions and 33 deletions

View file

@ -351,7 +351,7 @@ std::vector<std::string> OSUtils::split(const char *s,const char *const sep,cons
else if ((buf.size() <= 0)&&((quotTmp = strchr(quot,*s))))
quoteState = *quotTmp;
else if (strchr(sep,*s)) {
if (buf.size() > 0) {
if (!buf.empty()) {
fields.push_back(buf);
buf.clear();
} // else skip runs of separators