Skip to content

Commit 81eba33

Browse files
authored
Merge pull request dashpay#26 from isle2983/pushBackHelpers
Convenience wrappers for push_back-ing integer types
2 parents 3640541 + cfa0384 commit 81eba33

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

include/univalue.h

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,18 @@ class UniValue {
9292
std::string s(val_);
9393
return push_back(s);
9494
}
95+
bool push_back(uint64_t val_) {
96+
UniValue tmpVal(val_);
97+
return push_back(tmpVal);
98+
}
99+
bool push_back(int64_t val_) {
100+
UniValue tmpVal(val_);
101+
return push_back(tmpVal);
102+
}
103+
bool push_back(int val_) {
104+
UniValue tmpVal(val_);
105+
return push_back(tmpVal);
106+
}
95107
bool push_backV(const std::vector<UniValue>& vec);
96108

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

0 commit comments

Comments
 (0)