|
15 | 15 | #include <cassert>
|
16 | 16 |
|
17 | 17 | #include <sstream> // .get_int64()
|
18 |
| -#include <utility> // std::pair |
19 | 18 |
|
20 | 19 | class UniValue {
|
21 | 20 | public:
|
@@ -177,76 +176,9 @@ class UniValue {
|
177 | 176 | const UniValue& get_array() const;
|
178 | 177 |
|
179 | 178 | enum VType type() const { return getType(); }
|
180 |
| - bool push_back(std::pair<std::string,UniValue> pear) { |
181 |
| - return pushKV(pear.first, pear.second); |
182 |
| - } |
183 | 179 | friend const UniValue& find_value( const UniValue& obj, const std::string& name);
|
184 | 180 | };
|
185 | 181 |
|
186 |
| -// |
187 |
| -// The following were added for compatibility with json_spirit. |
188 |
| -// Most duplicate other methods, and should be removed. |
189 |
| -// |
190 |
| -static inline std::pair<std::string,UniValue> Pair(const char *cKey, const char *cVal) |
191 |
| -{ |
192 |
| - std::string key(cKey); |
193 |
| - UniValue uVal(cVal); |
194 |
| - return std::make_pair(key, uVal); |
195 |
| -} |
196 |
| - |
197 |
| -static inline std::pair<std::string,UniValue> Pair(const char *cKey, std::string strVal) |
198 |
| -{ |
199 |
| - std::string key(cKey); |
200 |
| - UniValue uVal(strVal); |
201 |
| - return std::make_pair(key, uVal); |
202 |
| -} |
203 |
| - |
204 |
| -static inline std::pair<std::string,UniValue> Pair(const char *cKey, uint64_t u64Val) |
205 |
| -{ |
206 |
| - std::string key(cKey); |
207 |
| - UniValue uVal(u64Val); |
208 |
| - return std::make_pair(key, uVal); |
209 |
| -} |
210 |
| - |
211 |
| -static inline std::pair<std::string,UniValue> Pair(const char *cKey, int64_t i64Val) |
212 |
| -{ |
213 |
| - std::string key(cKey); |
214 |
| - UniValue uVal(i64Val); |
215 |
| - return std::make_pair(key, uVal); |
216 |
| -} |
217 |
| - |
218 |
| -static inline std::pair<std::string,UniValue> Pair(const char *cKey, bool iVal) |
219 |
| -{ |
220 |
| - std::string key(cKey); |
221 |
| - UniValue uVal(iVal); |
222 |
| - return std::make_pair(key, uVal); |
223 |
| -} |
224 |
| - |
225 |
| -static inline std::pair<std::string,UniValue> Pair(const char *cKey, int iVal) |
226 |
| -{ |
227 |
| - std::string key(cKey); |
228 |
| - UniValue uVal(iVal); |
229 |
| - return std::make_pair(key, uVal); |
230 |
| -} |
231 |
| - |
232 |
| -static inline std::pair<std::string,UniValue> Pair(const char *cKey, double dVal) |
233 |
| -{ |
234 |
| - std::string key(cKey); |
235 |
| - UniValue uVal(dVal); |
236 |
| - return std::make_pair(key, uVal); |
237 |
| -} |
238 |
| - |
239 |
| -static inline std::pair<std::string,UniValue> Pair(const char *cKey, const UniValue& uVal) |
240 |
| -{ |
241 |
| - std::string key(cKey); |
242 |
| - return std::make_pair(key, uVal); |
243 |
| -} |
244 |
| - |
245 |
| -static inline std::pair<std::string,UniValue> Pair(std::string key, const UniValue& uVal) |
246 |
| -{ |
247 |
| - return std::make_pair(key, uVal); |
248 |
| -} |
249 |
| - |
250 | 182 | enum jtokentype {
|
251 | 183 | JTOK_ERR = -1,
|
252 | 184 | JTOK_NONE = 0, // eof
|
|
0 commit comments