Skip to content

fix: remove redundant const qualifier on reference type#198

Merged
ReenigneArcher merged 1 commit into
LizardByte:masterfrom
rbqvq:master
Feb 4, 2026
Merged

fix: remove redundant const qualifier on reference type#198
ReenigneArcher merged 1 commit into
LizardByte:masterfrom
rbqvq:master

Conversation

@rbqvq
Copy link
Copy Markdown
Contributor

@rbqvq rbqvq commented Feb 4, 2026

Description

CLANGARM64 emits -Wignored-reference-qualifiers
warning because 'const' on a reference type has no effect.

Removing it cleans up the build output and improves compatibility with LLVM toolchains.

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
  • Unit tests have been added or updated for any new or modified functionality

AI Usage

  • None: No AI tools were used in creating this PR
  • Light: AI provided minor assistance (formatting, simple suggestions)
  • Moderate: AI helped with code generation or debugging specific parts
  • Heavy: AI generated most or all of the code changes

CLANGARM64 emits -Wignored-reference-qualifiers
warning because 'const' on a reference type has no effect.

Removing it cleans up the build output and improves
compatibility with LLVM toolchains.

Signed-off-by: Coia Prant <coiaprant@gmail.com>
@rbqvq
Copy link
Copy Markdown
Contributor Author

rbqvq commented Feb 4, 2026

Original log here:

Warning: C:/a/Sunshine/Sunshine/third-party/libdisplaydevice/src/windows/settings_utils.cpp:45:77: warning: 'const' qualifier on reference type 'std::add_lvalue_reference_t<bool (const EnumeratedDevice &)>' (aka 'bool (&)(const EnumeratedDevice &)') has no effect [-Wignored-reference-qualifiers]
   45 |     std::set<std::string> getDeviceIds(const EnumeratedDeviceList &devices, const std::add_lvalue_reference_t<bool(const EnumeratedDevice &)> &predicate) {
      |  

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Feb 4, 2026

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 4, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.12%. Comparing base (825b484) to head (2470458).
⚠️ Report is 32 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #198   +/-   ##
=======================================
  Coverage   93.12%   93.12%           
=======================================
  Files          34       34           
  Lines        2123     2123           
  Branches     1086     1086           
=======================================
  Hits         1977     1977           
+ Misses         82       75    -7     
- Partials       64       71    +7     
Flag Coverage Δ
Linux 93.73% <ø> (ø)
Windows 92.80% <100.00%> (ø)
macOS 74.20% <ø> (ø)

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

Files with missing lines Coverage Δ
src/windows/settings_utils.cpp 96.50% <100.00%> (ø)

... and 1 file with indirect coverage changes

@ReenigneArcher
Copy link
Copy Markdown
Member

Failing test is not a result of these changes. PR welcome if you have a fix for it.

@ReenigneArcher ReenigneArcher merged commit 0bb8ab8 into LizardByte:master Feb 4, 2026
18 of 19 checks passed
@rbqvq
Copy link
Copy Markdown
Contributor Author

rbqvq commented Feb 4, 2026

Thanks, I think I don't have any fix plan :(

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.

2 participants