mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 18:22:57 +02:00
Replace boost::variant with std::variant
This commit is contained in:
@@ -11,7 +11,6 @@
|
||||
#include <wallet/wallet.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <typeinfo>
|
||||
|
||||
#include <QFont>
|
||||
#include <QDebug>
|
||||
@@ -82,8 +81,9 @@ public:
|
||||
{
|
||||
for (const auto& address : wallet.getAddresses())
|
||||
{
|
||||
if (pk_hash_only && address.dest.type() != typeid(PKHash))
|
||||
if (pk_hash_only && !std::holds_alternative<PKHash>(address.dest)) {
|
||||
continue;
|
||||
}
|
||||
AddressTableEntry::Type addressType = translateTransactionType(
|
||||
QString::fromStdString(address.purpose), address.is_mine);
|
||||
cachedAddressTable.append(AddressTableEntry(addressType,
|
||||
@@ -257,7 +257,7 @@ bool AddressTableModel::setData(const QModelIndex &index, const QVariant &value,
|
||||
} else if(index.column() == Address) {
|
||||
CTxDestination newAddress = DecodeDestination(value.toString().toStdString());
|
||||
// Refuse to set invalid address, set error status and return false
|
||||
if(boost::get<CNoDestination>(&newAddress))
|
||||
if(std::get_if<CNoDestination>(&newAddress))
|
||||
{
|
||||
editStatus = INVALID_ADDRESS;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user