Skip to content

Add braces to all for statements in src/ (excluding submodules)#204

Closed
Copilot wants to merge 1 commit into
masterfrom
copilot/modify-for-statements-add-braces
Closed

Add braces to all for statements in src/ (excluding submodules)#204
Copilot wants to merge 1 commit into
masterfrom
copilot/modify-for-statements-add-braces

Conversation

Copy link
Copy Markdown

Copilot AI commented Jun 7, 2026

All for loops in src/ (excluding submodule paths) that lacked curly braces around their bodies have been wrapped with braces, following the existing Allman brace style.

Changes

  • 69 files modified across src/game/ and src/shared/
  • Handles both next-line and same-line body patterns:
// Before
for (uint8 node = 0; node < BG_AB_NODES_MAX; ++node)
    for (uint8 i = 1; i < BG_AB_NODES_MAX; ++i)
    {
        FillInitialWorldState(data, count, ...);
    }

for (int i = 0; i < MAX_STATS; ++i) stats[i] = 0;

// After
for (uint8 node = 0; node < BG_AB_NODES_MAX; ++node)
{
    for (uint8 i = 1; i < BG_AB_NODES_MAX; ++i)
    {
        FillInitialWorldState(data, count, ...);
    }
}

for (int i = 0; i < MAX_STATS; ++i)
{
    stats[i] = 0;
}
  • Excluded submodules: src/realmd, src/modules/SD3, src/modules/Eluna, src/tools/Extractor_projects
  • Transformation is idempotent — a second pass produces zero changes

This change is Reviewable

@codacy-production
Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 complexity · 6 duplication

Metric Results
Complexity 0
Duplication 6

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@AppVeyorBot
Copy link
Copy Markdown

@billy1arm
Copy link
Copy Markdown
Member

Added manually

@billy1arm billy1arm closed this Jun 7, 2026
@billy1arm billy1arm deleted the copilot/modify-for-statements-add-braces branch June 7, 2026 20:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

3 participants