@@ -117,7 +117,7 @@ class WalletModel : public QObject
117117 bool autoBackupWallet (QString& strBackupWarningRet, QString& strBackupErrorRet);
118118 int64_t getKeysLeftSinceAutoBackup () const ;
119119
120- // RAI object for unlocking wallet, returned by requestUnlock()
120+ // RAII object for unlocking wallet, returned by requestUnlock()
121121 class UnlockContext
122122 {
123123 public:
@@ -126,19 +126,17 @@ class WalletModel : public QObject
126126
127127 bool isValid () const { return valid; }
128128
129- // Copy constructor is disabled .
129+ // Disable unused copy/move constructors/assignments explicitly .
130130 UnlockContext (const UnlockContext&) = delete ;
131- // Move operator and constructor transfer the context
132- UnlockContext (UnlockContext&& obj) { CopyFrom (std::move (obj)); }
133- UnlockContext& operator =(UnlockContext&& rhs) { CopyFrom (std::move (rhs)); return *this ; }
131+ UnlockContext (UnlockContext&&) = delete ;
132+ UnlockContext& operator =(const UnlockContext&) = delete ;
133+ UnlockContext& operator =(UnlockContext&&) = delete ;
134+
134135 private:
135136 WalletModel *wallet;
136- bool valid;
137- mutable bool was_locked; // mutable, as it can be set to false by copying
138- mutable bool was_mixing; // mutable, as it can be set to false by copying
139-
140- UnlockContext& operator =(const UnlockContext&) = default ;
141- void CopyFrom (UnlockContext&& rhs);
137+ const bool valid;
138+ const bool was_locked;
139+ const bool was_mixing;
142140 };
143141
144142 UnlockContext requestUnlock (bool fForMixingOnly = false );
0 commit comments