Prefer pre-increment/decrement operators in for loops

This commit is contained in:
Rangi42
2025-07-24 18:08:17 -04:00
parent c6d0e8de63
commit d6a28a6259
15 changed files with 48 additions and 48 deletions

View File

@@ -29,14 +29,14 @@ std::shared_ptr<std::string> MacroArgs::getAllArgs() const {
size_t len = 0;
for (uint32_t i = shift; i < nbArgs; i++) {
for (uint32_t i = shift; i < nbArgs; ++i) {
len += args[i]->length() + 1; // 1 for comma
}
auto str = std::make_shared<std::string>();
str->reserve(len + 1); // 1 for comma
for (uint32_t i = shift; i < nbArgs; i++) {
for (uint32_t i = shift; i < nbArgs; ++i) {
std::shared_ptr<std::string> const &arg = args[i];
str->append(*arg);