refactor: use C++11 default initializers
This commit is contained in:
39 files changed
+57
-88
No files matched your search
@@ -30,7 +30,7 @@ struct AddressTableEntry
|
||||
QString label;
|
||||
QString address;
|
||||
|
||||
AddressTableEntry() {}
|
||||
AddressTableEntry() = default;
|
||||
AddressTableEntry(Type _type, const QString &_label, const QString &_address):
|
||||
type(_type), label(_label), address(_address) {}
|
||||
};
|
||||
|
||||
@@ -89,10 +89,7 @@ BanTableModel::BanTableModel(interfaces::Node& node, QObject* parent) :
|
||||
refresh();
|
||||
}
|
||||
|
||||
BanTableModel::~BanTableModel()
|
||||
{
|
||||
// Intentionally left empty
|
||||
}
|
||||
BanTableModel::~BanTableModel() = default;
|
||||
|
||||
int BanTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
|
||||
@@ -71,7 +71,7 @@ Notificator::~Notificator()
|
||||
class FreedesktopImage
|
||||
{
|
||||
public:
|
||||
FreedesktopImage() {}
|
||||
FreedesktopImage() = default;
|
||||
explicit FreedesktopImage(const QImage &img);
|
||||
|
||||
// Image to variant that can be marshalled over DBus
|
||||
|
||||
@@ -35,8 +35,7 @@ class TxViewDelegate : public QAbstractItemDelegate
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit TxViewDelegate(const PlatformStyle* _platformStyle, QObject* parent = nullptr)
|
||||
: QAbstractItemDelegate(parent), unit(BitcoinUnit::BTC),
|
||||
platformStyle(_platformStyle)
|
||||
: QAbstractItemDelegate(parent), platformStyle(_platformStyle)
|
||||
{
|
||||
connect(this, &TxViewDelegate::width_changed, this, &TxViewDelegate::sizeHintChanged);
|
||||
}
|
||||
@@ -125,7 +124,7 @@ public:
|
||||
return {DECORATION_SIZE + 8 + minimum_text_width, DECORATION_SIZE};
|
||||
}
|
||||
|
||||
BitcoinUnit unit;
|
||||
BitcoinUnit unit{BitcoinUnit::BTC};
|
||||
|
||||
Q_SIGNALS:
|
||||
//! An intermediate signal for emitting from the `paint() const` member function.
|
||||
|
||||
@@ -158,9 +158,7 @@ PaymentServer::PaymentServer(QObject* parent, bool startLocalServer) :
|
||||
}
|
||||
}
|
||||
|
||||
PaymentServer::~PaymentServer()
|
||||
{
|
||||
}
|
||||
PaymentServer::~PaymentServer() = default;
|
||||
|
||||
//
|
||||
// OSX-specific way of handling bitcoin: URIs
|
||||
|
||||
@@ -28,10 +28,7 @@ PeerTableModel::PeerTableModel(interfaces::Node& node, QObject* parent) :
|
||||
refresh();
|
||||
}
|
||||
|
||||
PeerTableModel::~PeerTableModel()
|
||||
{
|
||||
// Intentionally left empty
|
||||
}
|
||||
PeerTableModel::~PeerTableModel() = default;
|
||||
|
||||
void PeerTableModel::startAutoRefresh()
|
||||
{
|
||||
|
||||
@@ -34,10 +34,7 @@ RecentRequestsTableModel::RecentRequestsTableModel(WalletModel *parent) :
|
||||
connect(walletModel->getOptionsModel(), &OptionsModel::displayUnitChanged, this, &RecentRequestsTableModel::updateDisplayUnit);
|
||||
}
|
||||
|
||||
RecentRequestsTableModel::~RecentRequestsTableModel()
|
||||
{
|
||||
/* Intentionally left empty */
|
||||
}
|
||||
RecentRequestsTableModel::~RecentRequestsTableModel() = default;
|
||||
|
||||
int RecentRequestsTableModel::rowCount(const QModelIndex &parent) const
|
||||
{
|
||||
|
||||
@@ -120,7 +120,7 @@ public:
|
||||
connect(&timer, &QTimer::timeout, [this]{ func(); });
|
||||
timer.start(millis);
|
||||
}
|
||||
~QtRPCTimerBase() {}
|
||||
~QtRPCTimerBase() = default;
|
||||
private:
|
||||
QTimer timer;
|
||||
std::function<void()> func;
|
||||
@@ -129,7 +129,7 @@ private:
|
||||
class QtRPCTimerInterface: public RPCTimerInterface
|
||||
{
|
||||
public:
|
||||
~QtRPCTimerInterface() {}
|
||||
~QtRPCTimerInterface() = default;
|
||||
const char *Name() override { return "Qt"; }
|
||||
RPCTimerBase* NewTimer(std::function<void()>& func, int64_t millis) override
|
||||
{
|
||||
|
||||
@@ -62,7 +62,7 @@ struct TxLessThan
|
||||
struct TransactionNotification
|
||||
{
|
||||
public:
|
||||
TransactionNotification() {}
|
||||
TransactionNotification() = default;
|
||||
TransactionNotification(uint256 _hash, ChangeType _status, bool _showTransaction):
|
||||
hash(_hash), status(_status), showTransaction(_showTransaction) {}
|
||||
|
||||
|
||||
@@ -55,9 +55,7 @@ WalletFrame::WalletFrame(const PlatformStyle* _platformStyle, QWidget* parent)
|
||||
walletStack->addWidget(no_wallet_group);
|
||||
}
|
||||
|
||||
WalletFrame::~WalletFrame()
|
||||
{
|
||||
}
|
||||
WalletFrame::~WalletFrame() = default;
|
||||
|
||||
void WalletFrame::setClientModel(ClientModel *_clientModel)
|
||||
{
|
||||
|
||||
@@ -111,9 +111,7 @@ WalletView::WalletView(WalletModel* wallet_model, const PlatformStyle* _platform
|
||||
connect(walletModel, &WalletModel::showProgress, this, &WalletView::showProgress);
|
||||
}
|
||||
|
||||
WalletView::~WalletView()
|
||||
{
|
||||
}
|
||||
WalletView::~WalletView() = default;
|
||||
|
||||
void WalletView::setClientModel(ClientModel *_clientModel)
|
||||
{
|
||||
|
||||
Reference in new issue
Block a user