Skip to content

Commit

Permalink
Merge pull request dogecoin#26 from isle2983/pushBackHelpers
Browse files Browse the repository at this point in the history
Convenience wrappers for push_back-ing integer types
  • Loading branch information
jgarzik authored Jan 29, 2017
2 parents 3640541 + cfa0384 commit 81eba33
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions include/univalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,18 @@ class UniValue {
std::string s(val_);
return push_back(s);
}
bool push_back(uint64_t val_) {
UniValue tmpVal(val_);
return push_back(tmpVal);
}
bool push_back(int64_t val_) {
UniValue tmpVal(val_);
return push_back(tmpVal);
}
bool push_back(int val_) {
UniValue tmpVal(val_);
return push_back(tmpVal);
}
bool push_backV(const std::vector<UniValue>& vec);

bool pushKV(const std::string& key, const UniValue& val);
Expand Down

0 comments on commit 81eba33

Please sign in to comment.