aboutsummaryrefslogtreecommitdiff
path: root/src/univalue/univalue.h
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2015-05-10 15:54:11 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2015-06-04 09:16:06 +0200
commite04d9c25cf96edaf5b70baec6a21ceca624deea6 (patch)
treea32ba88e126ecbd2385e00c4ada7163561638f70 /src/univalue/univalue.h
parent0c5b2cf69ae20f83cbd894bb19d0e111623bae0f (diff)
univalue: correct bool support
Diffstat (limited to 'src/univalue/univalue.h')
-rw-r--r--src/univalue/univalue.h10
1 files changed, 10 insertions, 0 deletions
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<std::string,UniValue> Pair(const char *cKey, int64_t i64
return std::make_pair(key, uVal);
}
+static inline std::pair<std::string,UniValue> Pair(const char *cKey, bool iVal)
+{
+ std::string key(cKey);
+ UniValue uVal(iVal);
+ return std::make_pair(key, uVal);
+}
+
static inline std::pair<std::string,UniValue> Pair(const char *cKey, int iVal)
{
std::string key(cKey);