Merge commit '2ca7faab4205822b06dc2ab2bbda0a9a70fce7e0' into HEAD
This commit is contained in:
commit
e757115164
3 changed files with 7 additions and 7 deletions
|
@ -1,4 +1,3 @@
|
||||||
|
|
||||||
language: cpp
|
language: cpp
|
||||||
|
|
||||||
compiler:
|
compiler:
|
||||||
|
@ -26,6 +25,7 @@ addons:
|
||||||
- pkg-config
|
- pkg-config
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
- if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then brew uninstall libtool; brew install libtool; fi
|
||||||
- if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
|
- if [ -n "$USE_SHELL" ]; then export CONFIG_SHELL="$USE_SHELL"; fi
|
||||||
- test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
|
- test -n "$USE_SHELL" && eval '"$USE_SHELL" -c "./autogen.sh"' || ./autogen.sh
|
||||||
|
|
||||||
|
|
|
@ -142,10 +142,10 @@ private:
|
||||||
public:
|
public:
|
||||||
// Strict type-specific getters, these throw std::runtime_error if the
|
// Strict type-specific getters, these throw std::runtime_error if the
|
||||||
// value is of unexpected type
|
// value is of unexpected type
|
||||||
std::vector<std::string> getKeys() const;
|
const std::vector<std::string>& getKeys() const;
|
||||||
std::vector<UniValue> getValues() const;
|
const std::vector<UniValue>& getValues() const;
|
||||||
bool get_bool() const;
|
bool get_bool() const;
|
||||||
std::string get_str() const;
|
const std::string& get_str() const;
|
||||||
int get_int() const;
|
int get_int() const;
|
||||||
int64_t get_int64() const;
|
int64_t get_int64() const;
|
||||||
double get_real() const;
|
double get_real() const;
|
||||||
|
|
|
@ -283,14 +283,14 @@ const UniValue& find_value(const UniValue& obj, const std::string& name)
|
||||||
return NullUniValue;
|
return NullUniValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<std::string> UniValue::getKeys() const
|
const std::vector<std::string>& UniValue::getKeys() const
|
||||||
{
|
{
|
||||||
if (typ != VOBJ)
|
if (typ != VOBJ)
|
||||||
throw std::runtime_error("JSON value is not an object as expected");
|
throw std::runtime_error("JSON value is not an object as expected");
|
||||||
return keys;
|
return keys;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<UniValue> UniValue::getValues() const
|
const std::vector<UniValue>& UniValue::getValues() const
|
||||||
{
|
{
|
||||||
if (typ != VOBJ && typ != VARR)
|
if (typ != VOBJ && typ != VARR)
|
||||||
throw std::runtime_error("JSON value is not an object or array as expected");
|
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();
|
return getBool();
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string UniValue::get_str() const
|
const std::string& UniValue::get_str() const
|
||||||
{
|
{
|
||||||
if (typ != VSTR)
|
if (typ != VSTR)
|
||||||
throw std::runtime_error("JSON value is not a string as expected");
|
throw std::runtime_error("JSON value is not a string as expected");
|
||||||
|
|
Loading…
Reference in a new issue