Skip to content

Conversation

@eseiler
Copy link
Member

@eseiler eseiler commented Nov 19, 2024

These are all Comparison of narrow type with wide type in loop condition

@seqan-actions seqan-actions added lint [INTERNAL] signal for linting and removed lint [INTERNAL] signal for linting labels Nov 19, 2024
@seqan-actions
Copy link
Member

Documentation preview available at https://docs.seqan.de/preview/seqan/seqan3/3307

@codecov
Copy link

codecov bot commented Nov 19, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.13%. Comparing base (6f38aac) to head (18e5ddb).
Report is 2 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #3307   +/-   ##
=======================================
  Coverage   98.13%   98.13%           
=======================================
  Files         271      271           
  Lines       11948    11954    +6     
  Branches      104      104           
=======================================
+ Hits        11725    11731    +6     
  Misses        223      223           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.


🚨 Try these New Features:

unsigned_t end = start << 1u;
for (unsigned_t n = start, k = 0u; n < end && k < max_iterations; ++n, ++k)
unsigned_t end = static_cast<unsigned_t>(std::min<size_t>(start / 2u, max_iterations));
for (unsigned_t n = start; n < end; ++n)
Copy link
Contributor

Choose a reason for hiding this comment

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

There seems to be something wrong here.
end = start * 2
but also the result of std::min seems wrong:
I expeected something like:
std::min(start, max_iterations) + start

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, that was very wrong 😆

{
unsigned_t start = unsigned_t{1u} << log2_value;
unsigned_t end = start << 1u;
unsigned_t end = static_cast<unsigned_t>(std::min<size_t>(start / 2u, max_iterations));
Copy link
Contributor

Choose a reason for hiding this comment

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

same here

@seqan-actions seqan-actions added lint [INTERNAL] signal for linting and removed lint [INTERNAL] signal for linting labels Nov 19, 2024
@eseiler eseiler requested a review from SGSSGene November 19, 2024 07:28
@eseiler
Copy link
Member Author

eseiler commented Nov 19, 2024

BTW, reports are here https://github.com/seqan/seqan3/security/code-scanning

@eseiler eseiler merged commit c5a8eb5 into seqan:main Nov 19, 2024
42 checks passed
@eseiler eseiler deleted the fix/codeql branch November 19, 2024 15:46
@eseiler eseiler mentioned this pull request Jan 27, 2025
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.

3 participants