aboutsummaryrefslogtreecommitdiff
path: root/src/univalue/include
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2018-02-12 09:13:30 -0500
committerMarcoFalke <falke.marco@gmail.com>2018-02-12 09:13:38 -0500
commit5dc00f68c49c46a380a98d06233f90528b8e2557 (patch)
treefab1c9ce142f896f26b9b79b80e5f5379d28aa73 /src/univalue/include
parent8e6f9f4ebc74f4e302e1e38ee21e1afd0d3823ce (diff)
parent91986ed206fa830e5985560c6895b0d30b375054 (diff)
downloadbitcoin-5dc00f68c49c46a380a98d06233f90528b8e2557.tar.xz
Merge #12193: RPC: Consistently use UniValue.pushKV instead of push_back(Pair()) (karel-3d)
91986ed206 scripted-diff: Use UniValue.pushKV instead of push_back(Pair()) (Karel Bilek) a570098021 Squashed 'src/univalue/' changes from 07947ff2da..51d3ab34ba (MarcoFalke) Pull request description: Rebased version of #11386 by karel-3d. Closes: #11386 Tree-SHA512: f3a81447e573c17e75813f4d41ceb34b9980eac81efdd98ddb149d7c51f792be7e2b32239b6ea7e6da68af23897afa6b4ce3f4e8070f9c4adf5105bf6075f2a0
Diffstat (limited to 'src/univalue/include')
-rw-r--r--src/univalue/include/univalue.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/univalue/include/univalue.h b/src/univalue/include/univalue.h
index 4fd2223b30..c15b2f051e 100644
--- a/src/univalue/include/univalue.h
+++ b/src/univalue/include/univalue.h
@@ -130,6 +130,10 @@ public:
UniValue tmpVal(val_);
return pushKV(key, tmpVal);
}
+ bool pushKV(const std::string& key, bool val_) {
+ UniValue tmpVal((bool)val_);
+ return pushKV(key, tmpVal);
+ }
bool pushKV(const std::string& key, int val_) {
UniValue tmpVal((int64_t)val_);
return pushKV(key, tmpVal);