Skip to content

Commit c7614f1

Browse files
author
Jeff Garzik
committed
univalue: remove unused methods getArray, getObject
1 parent a715a64 commit c7614f1

File tree

2 files changed

+0
-24
lines changed

2 files changed

+0
-24
lines changed

src/univalue/univalue.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -147,28 +147,6 @@ bool UniValue::pushKVs(const UniValue& obj)
147147
return true;
148148
}
149149

150-
bool UniValue::getArray(std::vector<UniValue>& arr)
151-
{
152-
if (typ != VARR)
153-
return false;
154-
155-
arr = values;
156-
return true;
157-
}
158-
159-
bool UniValue::getObject(std::map<std::string,UniValue>& obj)
160-
{
161-
if (typ != VOBJ)
162-
return false;
163-
164-
obj.clear();
165-
for (unsigned int i = 0; i < keys.size(); i++) {
166-
obj[keys[i]] = values[i];
167-
}
168-
169-
return true;
170-
}
171-
172150
int UniValue::findKey(const std::string& key) const
173151
{
174152
for (unsigned int i = 0; i < keys.size(); i++) {

src/univalue/univalue.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ class UniValue {
6161
size_t count() const { return values.size(); }
6262

6363
bool getBool() const { return isTrue(); }
64-
bool getArray(std::vector<UniValue>& arr);
65-
bool getObject(std::map<std::string,UniValue>& obj);
6664
bool checkObject(const std::map<std::string,UniValue::VType>& memberTypes);
6765
const UniValue& operator[](const std::string& key) const;
6866
const UniValue& operator[](unsigned int index) const;

0 commit comments

Comments
 (0)