diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/test/system_tests.cpp | 4 | ||||
-rw-r--r-- | src/univalue/include/univalue.h | 1 | ||||
-rw-r--r-- | src/univalue/lib/univalue_get.cpp | 2 | ||||
-rw-r--r-- | src/univalue/test/object.cpp | 4 |
4 files changed, 5 insertions, 6 deletions
diff --git a/src/test/system_tests.cpp b/src/test/system_tests.cpp index d5b65b9c08..472b58b4d5 100644 --- a/src/test/system_tests.cpp +++ b/src/test/system_tests.cpp @@ -47,7 +47,7 @@ BOOST_AUTO_TEST_CASE(run_command) BOOST_CHECK(result.isObject()); const UniValue& success = find_value(result, "success"); BOOST_CHECK(!success.isNull()); - BOOST_CHECK_EQUAL(success.getBool(), true); + BOOST_CHECK_EQUAL(success.get_bool(), true); } { // An invalid command is handled by Boost @@ -95,7 +95,7 @@ BOOST_AUTO_TEST_CASE(run_command) BOOST_CHECK(result.isObject()); const UniValue& success = find_value(result, "success"); BOOST_CHECK(!success.isNull()); - BOOST_CHECK_EQUAL(success.getBool(), true); + BOOST_CHECK_EQUAL(success.get_bool(), true); } #endif } diff --git a/src/univalue/include/univalue.h b/src/univalue/include/univalue.h index 1af7df079e..16853260b8 100644 --- a/src/univalue/include/univalue.h +++ b/src/univalue/include/univalue.h @@ -66,7 +66,6 @@ public: size_t size() const { return values.size(); } - bool getBool() const { return isTrue(); } void getObjMap(std::map<std::string,UniValue>& kv) const; bool checkObject(const std::map<std::string,UniValue::VType>& memberTypes) const; const UniValue& operator[](const std::string& key) const; diff --git a/src/univalue/lib/univalue_get.cpp b/src/univalue/lib/univalue_get.cpp index 5c58f388dd..037449ca08 100644 --- a/src/univalue/lib/univalue_get.cpp +++ b/src/univalue/lib/univalue_get.cpp @@ -60,7 +60,7 @@ const std::vector<UniValue>& UniValue::getValues() const bool UniValue::get_bool() const { checkType(VBOOL); - return getBool(); + return isTrue(); } const std::string& UniValue::get_str() const diff --git a/src/univalue/test/object.cpp b/src/univalue/test/object.cpp index 65e82543e4..eeaadae3e2 100644 --- a/src/univalue/test/object.cpp +++ b/src/univalue/test/object.cpp @@ -193,13 +193,13 @@ void univalue_set() BOOST_CHECK_EQUAL(v.isBool(), true); BOOST_CHECK_EQUAL(v.isTrue(), false); BOOST_CHECK_EQUAL(v.isFalse(), true); - BOOST_CHECK_EQUAL(v.getBool(), false); + BOOST_CHECK_EQUAL(v.get_bool(), false); v.setBool(true); BOOST_CHECK_EQUAL(v.isBool(), true); BOOST_CHECK_EQUAL(v.isTrue(), true); BOOST_CHECK_EQUAL(v.isFalse(), false); - BOOST_CHECK_EQUAL(v.getBool(), true); + BOOST_CHECK_EQUAL(v.get_bool(), true); BOOST_CHECK_THROW(v.setNumStr("zombocom"), std::runtime_error); |