PowerToys
PowerToys copied to clipboard
[Analyzers][CPP] Changes to fix warning 26493 on PowerToys/tools
Changes to fix warning 26493 (Don't use C-style casts) on PowerToys/tools
This change is split into several PRs. This does not turn on the rule only fixes the code under PowerToys/tools
PR Checklist
- [x] Continues towards: #940
- [x] Communication: I've discussed this with core contributors already. If work hasn't been agreed, this work might be rejected
- [ ] Tests: Added/updated and all pass
- [ ] Localization: All end user facing strings can be localized
- [ ] Dev docs: Added/updated
- [ ] New binaries: Added on the required places
- [ ] JSON for signing for new binaries
- [ ] WXS for installer for new binaries and localization folder
- [ ] YML for CI pipeline for new test projects
- [ ] YML for signed pipeline
- [ ] Documentation updated: If checked, please file a pull request on our docs repo and link it here: #xxx
Detailed Description of the Pull Request / Additional comments
Most of the changes are replacing the C-style cast with static_cast. Some of the C-style needed to be changed to reinterpret_cast. There is a rule to be turned on to avoid reinterpret_cast so this should be re-evaluated in the future.