Skip to content

Commit

Permalink
operator[] takes size_t index parameter (versus unsigned int)
Browse files Browse the repository at this point in the history
  • Loading branch information
kozyilmaz authored and jgarzik committed May 2, 2017
1 parent 640158f commit 0d3e74d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/univalue.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class UniValue {
bool getBool() const { return isTrue(); }
bool checkObject(const std::map<std::string,UniValue::VType>& memberTypes);
const UniValue& operator[](const std::string& key) const;
const UniValue& operator[](unsigned int index) const;
const UniValue& operator[](size_t index) const;
bool exists(const std::string& key) const { size_t i; return findKey(key, i); }

bool isNull() const { return (typ == VNULL); }
Expand Down
2 changes: 1 addition & 1 deletion lib/univalue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ const UniValue& UniValue::operator[](const std::string& key) const
return values.at(index);
}

const UniValue& UniValue::operator[](unsigned int index) const
const UniValue& UniValue::operator[](size_t index) const
{
if (typ != VOBJ && typ != VARR)
return NullUniValue;
Expand Down

0 comments on commit 0d3e74d

Please sign in to comment.