diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-10-03 08:44:53 +0200 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2016-10-03 08:45:13 +0200 |
commit | eafc5f4fae52a16ad7343f7fb13bfecf9b62310a (patch) | |
tree | 4e5be94c5b61d40599766e567e9d33c32264118a /src/univalue/lib/univalue.cpp | |
parent | 6f3ef551fa0fd5f40a027844104759855fd0b823 (diff) | |
parent | e757115164c6f73c93a2d65a289b8a54e46c669d (diff) | |
download | bitcoin-eafc5f4fae52a16ad7343f7fb13bfecf9b62310a.tar.xz |
Merge #8863: univalue: Pull subtree
2ca7faa Squashed 'src/univalue/' changes from daf1285..16a1f7f (MarcoFalke)
Diffstat (limited to 'src/univalue/lib/univalue.cpp')
-rw-r--r-- | src/univalue/lib/univalue.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/univalue/lib/univalue.cpp b/src/univalue/lib/univalue.cpp index 1f8cee6d29..5a2860c13f 100644 --- a/src/univalue/lib/univalue.cpp +++ b/src/univalue/lib/univalue.cpp @@ -283,14 +283,14 @@ const UniValue& find_value(const UniValue& obj, const std::string& name) return NullUniValue; } -std::vector<std::string> UniValue::getKeys() const +const std::vector<std::string>& UniValue::getKeys() const { if (typ != VOBJ) throw std::runtime_error("JSON value is not an object as expected"); return keys; } -std::vector<UniValue> UniValue::getValues() const +const std::vector<UniValue>& UniValue::getValues() const { if (typ != VOBJ && typ != VARR) throw std::runtime_error("JSON value is not an object or array as expected"); @@ -304,7 +304,7 @@ bool UniValue::get_bool() const return getBool(); } -std::string UniValue::get_str() const +const std::string& UniValue::get_str() const { if (typ != VSTR) throw std::runtime_error("JSON value is not a string as expected"); |