-
Notifications
You must be signed in to change notification settings - Fork 8
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
Fix/flat buffer #31
Fix/flat buffer #31
Conversation
GCOVR code coverage report https://31.buffers.prtest.cppalliance.org/gcovr/index.html |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #31 +/- ##
========================================
Coverage 99.08% 99.08%
========================================
Files 28 28
Lines 766 766
========================================
Hits 759 759
Misses 7 7
Continue to review full report in Codecov by Sentry.
|
Looks benign and I would like @ashtum to review these small, non-controversial things. Also is there an issue for |
@@ -96,7 +96,7 @@ class flat_buffer | |||
std::size_t | |||
capacity() const noexcept | |||
{ | |||
return cap_ - in_pos_; | |||
return cap_ - (in_pos_ + in_size_); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is correct for now, but it will change again once when we address #30.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, maybe not, because shrink_to_fit
would be a manual action and wouldn't happen automatically when calling prepare
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can implement shrink_to_fit
and then after, decide if we want this behavior to be automatic in prepare
.
This PR seems to also break a test in http-proto, which will need to be address later on.