-
Notifications
You must be signed in to change notification settings - Fork 27
Removing deprecated std::pair wrappers #5
Conversation
include/univalue.h
Outdated
| return pushKV(key, tmpVal); | ||
| } | ||
| bool pushKV(const std::string& key, bool val_) { | ||
| UniValue tmpVal((bool)val_); |
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.
cast is unnecessary
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.
Oh yes, result of copy-paste.
|
It'd be nice if this could add a test case for the new code. The master branch now has an If you think those changes are good, feel free to reset this branch to jnewbery@91cbfeb |
|
OK, I am closing this one, since I don't have the time to maintain it. |
|
Thanks for your commits @karel-3d ! I'll maintain this in #10. |
129bad9 [tests] test pushKV for boolean values (John Newbery) b3c44c9 Pushing boolean value to univalue correctly (Karel Bilek) Pull request description: Adds the new pushKV(key, boolean) function from #5, with test cases. Removal of srd::pair wrappers is in a future PR. Tree-SHA512: d13b377365181723c06d4e4d7efa88f3cdbc6ca06ec2effe2ddf834bdfc7e602072c957296370323cb4e921a6934d55b040ebbdacca1dbff66e75d32073e6ac8
This removes std::pair wrappers to simplify API
Note: this requires changes in bitcoin core, as in bitcoin/bitcoin#11386
Not sure where to backport this test change, or if it's even possible - jgarzik@6e71669