Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iterator: Remove ineffective const in base() return type #74

Merged

Conversation

amyspark
Copy link
Collaborator

Hey @dragonmux,

This fixes a lint in clang-tidy:

Return type 'const iterator_t' is 'const'-qualified at the top level, which may reduce code readability without improving const correctness (fix available) clang-tidy(readability-const-return-type)

It's also picked up by MSVC if warning C5266 is enabled.

@codecov
Copy link

codecov bot commented Aug 20, 2023

Codecov Report

Merging #74 (88c09c1) into main (221b269) will increase coverage by 0.04%.
The diff coverage is 100.00%.

❗ Current head 88c09c1 differs from pull request most recent head 8ec9109. Consider uploading reports for the commit 8ec9109 to get more accurate results

@@            Coverage Diff             @@
##             main      #74      +/-   ##
==========================================
+ Coverage   90.38%   90.43%   +0.04%     
==========================================
  Files          47       47              
  Lines        3277     3273       -4     
  Branches      644      640       -4     
==========================================
- Hits         2962     2960       -2     
+ Misses        249      247       -2     
  Partials       66       66              
Files Changed Coverage Δ
substrate/iterator 100.00% <100.00%> (ø)

... and 4 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Member

@dragonmux dragonmux left a comment

Choose a reason for hiding this comment

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

Good catch! iterator_t becomes const here anyway due to the function being for const this - please rebase this against main and we'll get this merged.

@dragonmux dragonmux added the bug Something isn't working label Aug 20, 2023
@dragonmux dragonmux merged commit 8ec9109 into bad-alloc-heavy-industries:main Aug 20, 2023
84 checks passed
@amyspark amyspark deleted the fix-const-useless branch August 20, 2023 19:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants