PowerToys icon indicating copy to clipboard operation
PowerToys copied to clipboard

[Analyzers][CPP] Changes to fix warning 26493 on src/runner

Open sosssego opened this issue 2 years ago • 0 comments

Changes to fix warning 26493 (Don't use C-style casts) on src/runner

This change is split into several PRs. This does not turn on the rule only fixes the code under src/runner

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
  • [ ] 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.

Validation Steps Performed

sosssego avatar Jan 30 '23 20:01 sosssego