Skip to content

refactor(windows): pass pointer viewports by const reference - #231

Merged
ReenigneArcher merged 1 commit into
masterfrom
codex/sonar-pointer-viewport-refs
Nov 21, 2026
Merged

ReenigneArcher merged 1 commit into
masterfrom
codex/sonar-pointer-viewport-refs

Conversation

@ReenigneArcher

Copy link
Copy Markdown
Member

Description

SonarCloud reports six cpp:S1238 findings for by-value PointerViewport parameters on master. Pass the desktop and viewport bounds by const reference in the Windows mouse constructor and the runtime viewport-validation test helper. The backend still stores copies of both bounds. SonarCloud findings

Screenshot

Issues Fixed or Closed

Roadmap Issues

Testing

  • Built the Windows library and GoogleTest executable with MSYS2 UCRT64.
  • Ran the Windows unit suite with --gtest_filter=-WindowsConsumerTest.*. 161 passed and 7 skipped, including five that require the installed broker and two Linux-only tests. Installed-device integration tests were excluded.
  • clang-format --dry-run --Werror on the changed lines and git diff --check passed.
  • SonarCloud reanalysis is pending.

Type of Change

  • feat: New feature (non-breaking change which adds functionality)
  • fix: Bug fix (non-breaking change which fixes an issue)
  • docs: Documentation only changes
  • style: Changes that do not affect the meaning of the code (white-space, formatting, missing semicolons, etc.)
  • refactor: Code change that neither fixes a bug nor adds a feature
  • perf: Code change that improves performance
  • test: Adding missing tests or correcting existing tests
  • build: Changes that affect the build system or external dependencies
  • ci: Changes to CI configuration files and scripts
  • chore: Other changes that don't modify src or test files
  • revert: Reverts a previous commit
  • BREAKING CHANGE: Introduces a breaking change (can be combined with any type above)

Checklist

  • Code follows the style guidelines of this project
  • Code has been self-reviewed
  • Code has been commented, particularly in hard-to-understand areas
  • Code docstring/documentation-blocks for new or existing methods/components have been added or updated
  • Tests have been added or updated for new or modified functionality, including regression tests for bug fixes

AI Usage

See our AI usage policy.

  • AI tools were used while preparing this PR

Codex (gpt-6.2-sol, xhigh thinking) investigated the findings, made the changes, ran validation, and drafted this pull request.

@sonarqubecloud

Copy link
Copy Markdown

@codecov

codecov Bot commented Nov 21, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.30%. Comparing base (85ed47d) to head (bf6a4ec).
✅ All tests successful. No failed tests found.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #231      +/-   ##
==========================================
- Coverage   73.32%   73.30%   -0.03%     
==========================================
  Files          45       45              
  Lines        9865     9865              
  Branches     3692     3692              
==========================================
- Hits         7234     7232       -2     
+ Misses       2004     1999       -5     
- Partials      627      634       +7     
Flag Coverage Δ
FreeBSD 53.72% <ø> (ø)
Linux-Clang 68.49% <ø> (-0.02%) ⬇️
Linux-GCC 80.74% <ø> (-0.04%) ⬇️
PowerShell 75.60% <ø> (ø)
Windows-MSVC 73.49% <ø> (ø)
Windows-MinGW-UCRT64 66.17% <100.00%> (-0.02%) ⬇️
macOS 50.90% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/platform/windows/windows_backend.cpp 83.17% <100.00%> (ø)

... and 1 file with indirect coverage changes


Continue to review full report in Codecov by Harness.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 85ed47d...bf6a4ec. Read the comment docs.

@ReenigneArcher
ReenigneArcher merged commit 93d53b6 into master Nov 21, 2026
36 checks passed
@ReenigneArcher
ReenigneArcher deleted the codex/sonar-pointer-viewport-refs branch November 21, 2026 01:18
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.

1 participant