This PR modernizes loops in the samples/ directory by replacing index‑based iteration with C++11 range‑based for loops where appropriate.
https://github.com/wxWidgets/wxWidgets/pull/26640
(2 files)
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Hi, just a small note:
The Ubuntu 18.04 GTK2/GTK3 jobs seem to fail due to the CI environment itself. The logs show a PPA/GPG issue during setup, long before the build reaches any of the sample code. All other platforms passed fine. This PR only updates simple loops in the samples and doesn’t change behavior.
Thanks a lot for taking a look!
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Thanks, this can be merged but are these the only example of for loops that could be modernized? I'm a bit surprised by this... Have you done this manually or did you try running clang-tidy which I think has a check to do this automatically?
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()
Thanks for the feedback!
I found these loops while working through the samples/, and decided to modernize them to make the sample code a bit clearer for newer learners. I searched the samples/ folder using some useful commands like:
git grep -n "for (size_t" samples/
git grep -n "for.*size_t.*<.*Count"
and manually checked each match to ensure it was safe to convert. These were the only cases that met the criteria.
I haven’t used clang‑tidy for this pass, but I’m happy to do so — and I’m also willing to continue in this direction in more areas if that would be helpful.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications, keep track of coding agent tasks and review pull requests on the go with GitHub Mobile for iOS and Android. Download it today!
You are receiving this because you are subscribed to this thread.![]()