diff options
author | MarcoFalke <falke.marco@gmail.com> | 2016-09-25 15:19:23 +0200 |
---|---|---|
committer | MarcoFalke <falke.marco@gmail.com> | 2016-09-25 15:19:23 +0200 |
commit | 9bf41af708e7efa9b9bc69886ca2fb4323f036b6 (patch) | |
tree | d0997921998de5e9656e022eb4e67cd9b3e460fe /src/univalue/lib | |
parent | 24f72e9f3fd0ce64b944c2a474786f06ed5fa0fd (diff) | |
parent | 3650668cdbbf369dd8f30c8e8eb5bb883325942d (diff) |
Merge commit '3650668cdbbf369dd8f30c8e8eb5bb883325942d' into HEAD
Diffstat (limited to 'src/univalue/lib')
-rw-r--r-- | src/univalue/lib/univalue.cpp | 25 |
1 files changed, 11 insertions, 14 deletions
diff --git a/src/univalue/lib/univalue.cpp b/src/univalue/lib/univalue.cpp index 0076d6678e..1f8cee6d29 100644 --- a/src/univalue/lib/univalue.cpp +++ b/src/univalue/lib/univalue.cpp @@ -119,32 +119,29 @@ bool UniValue::setNumStr(const string& val_) return true; } -bool UniValue::setInt(uint64_t val) +bool UniValue::setInt(uint64_t val_) { - string s; ostringstream oss; - oss << val; + oss << val_; return setNumStr(oss.str()); } -bool UniValue::setInt(int64_t val) +bool UniValue::setInt(int64_t val_) { - string s; ostringstream oss; - oss << val; + oss << val_; return setNumStr(oss.str()); } -bool UniValue::setFloat(double val) +bool UniValue::setFloat(double val_) { - string s; ostringstream oss; - oss << std::setprecision(16) << val; + oss << std::setprecision(16) << val_; bool ret = setNumStr(oss.str()); typ = VNUM; @@ -173,12 +170,12 @@ bool UniValue::setObject() return true; } -bool UniValue::push_back(const UniValue& val) +bool UniValue::push_back(const UniValue& val_) { if (typ != VARR) return false; - values.push_back(val); + values.push_back(val_); return true; } @@ -192,13 +189,13 @@ bool UniValue::push_backV(const std::vector<UniValue>& vec) return true; } -bool UniValue::pushKV(const std::string& key, const UniValue& val) +bool UniValue::pushKV(const std::string& key, const UniValue& val_) { if (typ != VOBJ) return false; keys.push_back(key); - values.push_back(val); + values.push_back(val_); return true; } @@ -228,7 +225,7 @@ int UniValue::findKey(const std::string& key) const bool UniValue::checkObject(const std::map<std::string,UniValue::VType>& t) { for (std::map<std::string,UniValue::VType>::const_iterator it = t.begin(); - it != t.end(); it++) { + it != t.end(); ++it) { int idx = findKey(it->first); if (idx < 0) return false; |