Skip to content

Commit

Permalink
Merge pull request bitcoin#664 from kyuupichan/univalue-release
Browse files Browse the repository at this point in the history
[Backport to release of bitcoin#624] Fix --enable-debug on OSX
  • Loading branch information
gandrewstone authored Jun 9, 2017
2 parents 7e94f2e + 36e2632 commit db95f5a
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions src/univalue/include/univalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,14 @@ class UniValue {
typ = initialType;
val = initialStr;
}
UniValue(uint64_t val_) {
setInt(val_);
UniValue(unsigned int val_) {
setInt((uint64_t)val_);
}
UniValue(unsigned long val_) {
setInt((uint64_t)val_);
}
UniValue(unsigned long long val_) {
setInt((uint64_t)val_);
}
UniValue(int64_t val_) {
setInt(val_);
Expand All @@ -37,9 +43,6 @@ class UniValue {
UniValue(int val_) {
setInt(val_);
}
UniValue(unsigned int val_) { // BU
setInt((uint64_t)val_);
}
UniValue(double val_) {
setFloat(val_);
}
Expand Down Expand Up @@ -180,10 +183,17 @@ static inline std::pair<std::string,UniValue> Pair(const char *cKey, std::string
return std::make_pair(key, uVal);
}

static inline std::pair<std::string,UniValue> Pair(const char *cKey, uint64_t u64Val)
static inline std::pair<std::string,UniValue> Pair(const char *cKey, unsigned long ulVal)
{
std::string key(cKey);
UniValue uVal(ulVal);
return std::make_pair(key, uVal);
}

static inline std::pair<std::string,UniValue> Pair(const char *cKey, unsigned long long ullVal)
{
std::string key(cKey);
UniValue uVal(u64Val);
UniValue uVal(ullVal);
return std::make_pair(key, uVal);
}

Expand Down

0 comments on commit db95f5a

Please sign in to comment.