Skip to content

Commit

Permalink
univalue: correct bool support
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasschnelli committed Jun 4, 2015
1 parent 0c5b2cf commit e04d9c2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/univalue/univalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ class UniValue {
UniValue(int64_t val_) {
setInt(val_);
}
UniValue(bool val_) {
setBool(val_);
}
UniValue(int val_) {
setInt(val_);
}
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e04d9c2

Please sign in to comment.