Skip to content

chore: clean up clang-tidy warnings#50862

Open
dsanders11 wants to merge 12 commits intomainfrom
chore/clang-tidy-cleanups
Open

chore: clean up clang-tidy warnings#50862
dsanders11 wants to merge 12 commits intomainfrom
chore/clang-tidy-cleanups

Conversation

@dsanders11
Copy link
Copy Markdown
Member

Description of Change

This cleans up warnings from clang-tidy that came out of #50771, on macOS and Windows.

These are pretty straight forward, and I had Claude double check it.

Checklist

  • PR description included

Release Notes

Notes: none

…e-readability-casting]

CFLocaleGetValue already returns CFTypeRef so that redundant static_cast was removed
Looks like clang-tidy couldn't tell these were two mutually exclusive
branches so there was no actual issue, but refactoring is cleaner
anyway since it makes it more DRY.
…lity-casting]

No cast needed here, everything is already the correct type
@dsanders11 dsanders11 added semver/none target/42-x-y PR should also be added to the "42-x-y" branch. labels Apr 9, 2026
@electron-cation electron-cation bot added the new-pr 🌱 PR opened recently label Apr 9, 2026
@dsanders11 dsanders11 force-pushed the chore/clang-tidy-cleanups branch from 2d5c44c to 3d94f67 Compare April 9, 2026 21:30
@dsanders11 dsanders11 force-pushed the chore/clang-tidy-cleanups branch from 3d94f67 to 7adcfe1 Compare April 9, 2026 21:53
Comment on lines +205 to +206
for (auto* notify_icon : notify_icons_) {
auto* current_win_icon = static_cast<NotifyIcon*>(notify_icon);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
for (auto* notify_icon : notify_icons_) {
auto* current_win_icon = static_cast<NotifyIcon*>(notify_icon);
for (const auto* notify_icon : notify_icons_) {
const auto* current_win_icon = static_cast<NotifyIcon*>(notify_icon);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made this change, and I tweaked this a bit further, since I realized that the fixit from clang-tidy here was a bit too mechanical. Once we switched to the range-based for loop we don't need the static_cast line at all.

@dsanders11 dsanders11 force-pushed the chore/clang-tidy-cleanups branch from 4499a5d to 5e7689c Compare April 9, 2026 22:35
@dsanders11 dsanders11 added the target/41-x-y PR should also be added to the "41-x-y" branch. label Apr 10, 2026
@dsanders11 dsanders11 marked this pull request as ready for review April 10, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new-pr 🌱 PR opened recently semver/none target/41-x-y PR should also be added to the "41-x-y" branch. target/42-x-y PR should also be added to the "42-x-y" branch.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants