Skip to content

Commit 85052a4

Browse files
karelbilekJohn Newbery
authored andcommitted
Remove deprecated std::pair wrappers
1 parent 51d3ab3 commit 85052a4

File tree

1 file changed

+0
-68
lines changed

1 file changed

+0
-68
lines changed

include/univalue.h

Lines changed: 0 additions & 68 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
#include <cassert>
1616

1717
#include <sstream> // .get_int64()
18-
#include <utility> // std::pair
1918

2019
class UniValue {
2120
public:
@@ -177,76 +176,9 @@ class UniValue {
177176
const UniValue& get_array() const;
178177

179178
enum VType type() const { return getType(); }
180-
bool push_back(std::pair<std::string,UniValue> pear) {
181-
return pushKV(pear.first, pear.second);
182-
}
183179
friend const UniValue& find_value( const UniValue& obj, const std::string& name);
184180
};
185181

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-
250182
enum jtokentype {
251183
JTOK_ERR = -1,
252184
JTOK_NONE = 0, // eof

0 commit comments

Comments
 (0)