-
Notifications
You must be signed in to change notification settings - Fork 37.8k
Refactor: Removed begin/end_ptr functions. #9305
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
Conversation
Concept ACK |
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.
yay, utACK / concept ACK
ACK 8c1dbc5 |
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.
utACK 8c1dbc5
I was about to mention the developer notes, but they're already gone from there. utACK 8c1dbc5 |
8c1dbc5 Refactor: Removed begin/end_ptr functions. (Karl-Johan Alm)
8c1dbc5 Refactor: Removed begin/end_ptr functions. (Karl-Johan Alm)
8c1dbc5 Refactor: Removed begin/end_ptr functions. (Karl-Johan Alm)
8c1dbc5 Refactor: Removed begin/end_ptr functions. (Karl-Johan Alm)
172fe15 Add missing locks and locking annotations for CAddrMan (practicalswift) 9271ace Support serialization as another type without casting (Pieter Wuille) dc37dd9 Remove unnecessary NONNEGATIVE_SIGNED (Russell Yanofsky) ddd2ab1 Add static_assert to prevent VARINT(<signed value>) (Russell Yanofsky) 539db35 Support deserializing into temporaries (Pieter Wuille) 36db7fd Merge READWRITEMANY into READWRITE (Pieter Wuille) 08ebd5b Remove old pre C++11 functions begin_ptr/end_ptr. (furszy) 9c84665 Prevent integer overflow in ReadVarInt. (Gregory Maxwell) Pull request description: Back ported some pretty concise PRs from upstream over the data serialization area. * bitcoin#9305. --> removal of pre c++11 compatibility functions. * bitcoin#9693. --> prevent integer overflow in `ReadVarInt`. * bitcoin#9753. --> compile error if VARINT is called with a signed value. * bitcoin#12683. --> fixing constness violations * bitcoin#12731. --> support for `READWRITEAS` macro. ACKs for top commit: random-zebra: ACK 172fe15 Fuzzbawls: ACK 172fe15 Tree-SHA512: 1e1e697761b885dcc1aed8a2132bed693b1c76f1f2ed22ae5c074dfb4c353b81d307f71a4c12ed71fc39fd2207c1403881bd699e32b85a167bee57b4f0946130
serialize.h
has a number of functions for accessing the data insidestd::vector
s, prepended with a warning to not use them in new code, as "with C++11 the language has built-in functionality for this and it's more readable to just use that". This PR removes these functions and their uses.begin_ptr(X)
→X.data()
end_ptr(X)
→(X.data() + X.size())