Skip to content

Use explicit size_t for loop variables to avoid signed/unsigned comparison warnings#25

Draft
Copilot wants to merge 1 commit intoissue19_conanfrom
copilot/sub-pr-21-yet-again
Draft

Use explicit size_t for loop variables to avoid signed/unsigned comparison warnings#25
Copilot wants to merge 1 commit intoissue19_conanfrom
copilot/sub-pr-21-yet-again

Conversation

Copy link

Copilot AI commented Dec 4, 2025

Addresses review feedback on loop variable types in EstimatorBase.cpp that could trigger signed/unsigned comparison warnings.

Changes

  • Changed loop variable declarations from auto to explicit size_t types
  • Ensures type compatibility with array indices (roi[0], roi[1], roi[2], roi[3])
  • Prevents potential signed/unsigned comparison warnings at lines 202-206
// Before: auto deduces to int from literal 0
for (auto y = 0; y < roi[3]; ++y) {
    for (auto x = roi[0]; x < roi[2]; ++x) {
        // ...
    }
}

// After: explicit size_t matches array index types
for (size_t y = 0; y < roi[3]; ++y) {
    for (size_t x = roi[0]; x < roi[2]; ++x) {
        // ...
    }
}

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

Copilot AI mentioned this pull request Dec 4, 2025
Copilot AI changed the title [WIP] WIP Address feedback on Issue19 conan PR Use explicit size_t for loop variables to avoid signed/unsigned comparison warnings Dec 4, 2025
Copilot AI requested a review from anderskaestner December 4, 2025 12:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants