txdb: Remove const annotation from blockinfo iterator type#6314
Merged
str4d merged 2 commits intozcash:masterfrom Jan 3, 2023
Merged
txdb: Remove const annotation from blockinfo iterator type#6314str4d merged 2 commits intozcash:masterfrom
str4d merged 2 commits intozcash:masterfrom
Conversation
The const annotation was removed from the blockinfo type in zcash#6192, but not from the type of its iterator. Recent Clang versions are able to handle this, but GCC 11 (and it appears older Clang versions) raise an error. Closes zcash#6306.
nuttycom
previously approved these changes
Jan 3, 2023
Contributor
nuttycom
left a comment
There was a problem hiding this comment.
utACK with nonblocking comment
nuttycom
approved these changes
Jan 3, 2023
| CDBBatch batch(*this); | ||
| for (std::vector<std::pair<int, const CBlockFileInfo*> >::const_iterator it=fileInfo.begin(); it != fileInfo.end(); it++) { | ||
| batch.Write(make_pair(DB_BLOCK_FILES, it->first), *it->second); | ||
| for (const auto& it : fileInfo) { |
Contributor
There was a problem hiding this comment.
NB: this probably shouldn't be called it any more, as it's not an iterator, but no big deal.
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The const annotation was removed from the blockinfo type in #6192, but not from the type of its iterator. Recent Clang versions are able to handle this, but GCC 11 (and it appears older Clang versions) raise an error.
Closes #6306.