[Pkg-bitcoin-commits] [libunivalue] 08/38: Convenience wrappers for push_back-ing integer types

Jonas Smedegaard dr at jones.dk
Mon Feb 27 01:13:26 UTC 2017


This is an automated email from the git hooks/post-receive script.

js pushed a commit to branch master
in repository libunivalue.

commit cfa0384d642ee2623502792d53c6c06020bd2eb5
Author: isle2983 <isle2983 at yahoo.com>
Date:   Sat Sep 10 16:15:39 2016 -0600

    Convenience wrappers for push_back-ing integer types
---
 include/univalue.h | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/include/univalue.h b/include/univalue.h
index e48b905..1d215d5 100644
--- a/include/univalue.h
+++ b/include/univalue.h
@@ -92,6 +92,18 @@ public:
         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);

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bitcoin/libunivalue.git



More information about the Pkg-bitcoin-commits mailing list