Replace boost::array with std::array
This commit is contained in:
@@ -23,6 +23,7 @@
|
||||
#include "rpcprotocol.h"
|
||||
#include "init.h"
|
||||
|
||||
#include <array>
|
||||
#include <chrono>
|
||||
#include <thread>
|
||||
|
||||
@@ -1042,7 +1043,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_sendmany_internals)
|
||||
TEST_FRIEND_AsyncRPCOperation_sendmany proxy(ptr);
|
||||
|
||||
std::string memo = "DEADBEEF";
|
||||
boost::array<unsigned char, ZC_MEMO_SIZE> array = proxy.get_memo_from_hex_string(memo);
|
||||
std::array<unsigned char, ZC_MEMO_SIZE> array = proxy.get_memo_from_hex_string(memo);
|
||||
BOOST_CHECK_EQUAL(array[0], 0xDE);
|
||||
BOOST_CHECK_EQUAL(array[1], 0xAD);
|
||||
BOOST_CHECK_EQUAL(array[2], 0xBE);
|
||||
@@ -1652,7 +1653,7 @@ BOOST_AUTO_TEST_CASE(rpc_z_mergetoaddress_internals)
|
||||
TEST_FRIEND_AsyncRPCOperation_mergetoaddress proxy(ptr);
|
||||
|
||||
std::string memo = "DEADBEEF";
|
||||
boost::array<unsigned char, ZC_MEMO_SIZE> array = proxy.get_memo_from_hex_string(memo);
|
||||
std::array<unsigned char, ZC_MEMO_SIZE> array = proxy.get_memo_from_hex_string(memo);
|
||||
BOOST_CHECK_EQUAL(array[0], 0xDE);
|
||||
BOOST_CHECK_EQUAL(array[1], 0xAD);
|
||||
BOOST_CHECK_EQUAL(array[2], 0xBE);
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "test/test_bitcoin.h"
|
||||
#include "utilstrencodings.h"
|
||||
|
||||
#include <array>
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boost/test/unit_test.hpp>
|
||||
@@ -96,9 +97,9 @@ BOOST_AUTO_TEST_CASE(boost_optional)
|
||||
}
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(boost_arrays)
|
||||
BOOST_AUTO_TEST_CASE(arrays)
|
||||
{
|
||||
boost::array<std::string, 2> test_case = {string("zub"), string("baz")};
|
||||
std::array<std::string, 2> test_case = {string("zub"), string("baz")};
|
||||
CDataStream ss(SER_DISK, 0);
|
||||
ss << test_case;
|
||||
|
||||
@@ -119,12 +120,12 @@ BOOST_AUTO_TEST_CASE(boost_arrays)
|
||||
BOOST_CHECK(hash == hash2);
|
||||
}
|
||||
|
||||
boost::array<std::string, 2> decoded_test_case;
|
||||
std::array<std::string, 2> decoded_test_case;
|
||||
ss >> decoded_test_case;
|
||||
|
||||
BOOST_CHECK(decoded_test_case == test_case);
|
||||
|
||||
boost::array<int32_t, 2> test = {100, 200};
|
||||
std::array<int32_t, 2> test = {100, 200};
|
||||
|
||||
BOOST_CHECK_EQUAL(GetSerializeSize(test, 0, 0), 8);
|
||||
}
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
|
||||
#include "sodium.h"
|
||||
|
||||
#include <array>
|
||||
#include <map>
|
||||
#include <string>
|
||||
|
||||
@@ -360,11 +361,11 @@ BOOST_AUTO_TEST_CASE(test_basic_joinsplit_verification)
|
||||
|
||||
// create JSDescription
|
||||
uint256 pubKeyHash;
|
||||
boost::array<libzcash::JSInput, ZC_NUM_JS_INPUTS> inputs = {
|
||||
std::array<libzcash::JSInput, ZC_NUM_JS_INPUTS> inputs = {
|
||||
libzcash::JSInput(witness, note, k),
|
||||
libzcash::JSInput() // dummy input of zero value
|
||||
};
|
||||
boost::array<libzcash::JSOutput, ZC_NUM_JS_OUTPUTS> outputs = {
|
||||
std::array<libzcash::JSOutput, ZC_NUM_JS_OUTPUTS> outputs = {
|
||||
libzcash::JSOutput(addr, 50),
|
||||
libzcash::JSOutput(addr, 50)
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user