From e04d9c25cf96edaf5b70baec6a21ceca624deea6 Mon Sep 17 00:00:00 2001 From: Jonas Schnelli Date: Sun, 10 May 2015 15:54:11 +0200 Subject: univalue: correct bool support --- src/univalue/univalue.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/univalue') diff --git a/src/univalue/univalue.h b/src/univalue/univalue.h index efcf202bdd..c37a3829fc 100644 --- a/src/univalue/univalue.h +++ b/src/univalue/univalue.h @@ -30,6 +30,9 @@ public: UniValue(int64_t val_) { setInt(val_); } + UniValue(bool val_) { + setBool(val_); + } UniValue(int val_) { setInt(val_); } @@ -192,6 +195,13 @@ static inline std::pair Pair(const char *cKey, int64_t i64 return std::make_pair(key, uVal); } +static inline std::pair Pair(const char *cKey, bool iVal) +{ + std::string key(cKey); + UniValue uVal(iVal); + return std::make_pair(key, uVal); +} + static inline std::pair Pair(const char *cKey, int iVal) { std::string key(cKey); -- cgit v1.2.3