]> Git Repo - VerusCoin.git/commitdiff
univalue: correct bool support
authorJonas Schnelli <[email protected]>
Sun, 10 May 2015 13:54:11 +0000 (15:54 +0200)
committerJack Grigg <[email protected]>
Fri, 10 Feb 2017 00:35:24 +0000 (00:35 +0000)
src/univalue/univalue.h

index efcf202bdd409a108ea5f8c91313dfc368f5ca49..c37a3829fc8e252fc1f4dbcf44641ec45fdfb681 100644 (file)
@@ -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);
This page took 0.025816 seconds and 4 git commands to generate.