Skip to content

Commit 0d3e74d

Browse files
kozyilmazjgarzik
authored andcommitted
operator[] takes size_t index parameter (versus unsigned int)
1 parent 640158f commit 0d3e74d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/univalue.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ class UniValue {
7171
bool getBool() const { return isTrue(); }
7272
bool checkObject(const std::map<std::string,UniValue::VType>& memberTypes);
7373
const UniValue& operator[](const std::string& key) const;
74-
const UniValue& operator[](unsigned int index) const;
74+
const UniValue& operator[](size_t index) const;
7575
bool exists(const std::string& key) const { size_t i; return findKey(key, i); }
7676

7777
bool isNull() const { return (typ == VNULL); }

lib/univalue.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ const UniValue& UniValue::operator[](const std::string& key) const
251251
return values.at(index);
252252
}
253253

254-
const UniValue& UniValue::operator[](unsigned int index) const
254+
const UniValue& UniValue::operator[](size_t index) const
255255
{
256256
if (typ != VOBJ && typ != VARR)
257257
return NullUniValue;

0 commit comments

Comments
 (0)