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

Simplified slice #2674

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Simplified slice #2674

wants to merge 1 commit into from

Conversation

neheb
Copy link
Collaborator

@neheb neheb commented Jul 1, 2023

No description provided.

@ghost
Copy link

ghost commented Jul 1, 2023

👇 Click on the image for a new way to code review

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map legend

@codecov
Copy link

codecov bot commented Jul 1, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 64.61%. Comparing base (77915ad) to head (f1198ad).
Report is 4 commits behind head on main.

❗ Current head f1198ad differs from pull request most recent head 1ae0f4c. Consider uploading reports for the commit 1ae0f4c to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2674      +/-   ##
==========================================
- Coverage   64.62%   64.61%   -0.01%     
==========================================
  Files         104      104              
  Lines       22239    22237       -2     
  Branches    10911    10911              
==========================================
- Hits        14371    14369       -2     
  Misses       5626     5626              
  Partials     2242     2242              

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

@neheb
Copy link
Collaborator Author

neheb commented Jul 1, 2023

slice.hpp needs more. There are some that don't work for some reason.

/*!
* Constructs a new constant subSlice. Behaves otherwise exactly like
* the non-const version.
*/
[[nodiscard]] Slice<const container> subSlice(size_t begin, size_t end) const {
Slice<const container> subSlice(size_t begin, size_t end) const {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why did you remove [[nodiscard]]?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

if I don't, it starts warning on the unit tests.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd prefer to fix that in the unit tests. Could you suppress the warning with the cast-to-void trick?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

eh I don't see the value. All such warnings are in ASSERT_THROW

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK. Fixed the unit tests.

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.

None yet

2 participants