File tree Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Expand file tree Collapse file tree 2 files changed +8
-17
lines changed Original file line number Diff line number Diff line change @@ -477,13 +477,6 @@ WalletModel::UnlockContext::~UnlockContext()
477477 }
478478}
479479
480- void WalletModel::UnlockContext::CopyFrom (UnlockContext&& rhs)
481- {
482- // Transfer context; old object no longer relocks wallet
483- *this = rhs;
484- rhs.relock = false ;
485- }
486-
487480bool WalletModel::bumpFee (uint256 hash, uint256& new_hash)
488481{
489482 CCoinControl coin_control;
Original file line number Diff line number Diff line change @@ -111,7 +111,7 @@ class WalletModel : public QObject
111111 bool setWalletLocked (bool locked, const SecureString &passPhrase=SecureString());
112112 bool changePassphrase (const SecureString &oldPass, const SecureString &newPass);
113113
114- // RAI object for unlocking wallet, returned by requestUnlock()
114+ // RAII object for unlocking wallet, returned by requestUnlock()
115115 class UnlockContext
116116 {
117117 public:
@@ -120,18 +120,16 @@ class WalletModel : public QObject
120120
121121 bool isValid () const { return valid; }
122122
123- // Copy constructor is disabled .
123+ // Disable unused copy/move constructors/assignments explicitly .
124124 UnlockContext (const UnlockContext&) = delete ;
125- // Move operator and constructor transfer the context
126- UnlockContext (UnlockContext&& obj) { CopyFrom (std::move (obj)); }
127- UnlockContext& operator =(UnlockContext&& rhs) { CopyFrom (std::move (rhs)); return *this ; }
125+ UnlockContext (UnlockContext&&) = delete ;
126+ UnlockContext& operator =(const UnlockContext&) = delete ;
127+ UnlockContext& operator =(UnlockContext&&) = delete ;
128+
128129 private:
129130 WalletModel *wallet;
130- bool valid;
131- mutable bool relock; // mutable, as it can be set to false by copying
132-
133- UnlockContext& operator =(const UnlockContext&) = default ;
134- void CopyFrom (UnlockContext&& rhs);
131+ const bool valid;
132+ const bool relock;
135133 };
136134
137135 UnlockContext requestUnlock ();
You can’t perform that action at this time.
0 commit comments