-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
AmendmentTable improvements #3404
AmendmentTable improvements #3404
Conversation
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.
Good changes all. 👍 from me.
|
||
{ | ||
std::lock_guard sl(mutex_); | ||
amendments.reserve(amendmentMap_.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.
Nice catch on this one.
Codecov Report
@@ Coverage Diff @@
## develop #3404 +/- ##
===========================================
+ Coverage 70.44% 70.45% +0.01%
===========================================
Files 682 682
Lines 54392 54389 -3
===========================================
+ Hits 38315 38321 +6
+ Misses 16077 16068 -9
Continue to review full report at Codecov.
|
{ | ||
// Forward to the const version of get. | ||
return const_cast<AmendmentState*>( | ||
std::as_const(*this).get(amendmentHash, sl)); |
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.
What's this now? std::as_const
? Neat.
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.
Looks good!
While working on retiring amendments I made a number of improvements to the AmendmentTable and its unit tests. Since we're not moving forward with retiring amendments, this pull request contains the improvements to the AmendmentTable and its unit tests that I believe we want to keep.
This code should look very familiar to the reviewers. It's just selected favorite highlights from the retiring amendments pull request. Thanks for looking it over again.