WalletModel::UnlockContext seems to implement "move upon copy" semantics; with C++11 this can be done more safely using move semantics (making attempts to actually copy fail instead).
Not a big deal if this isn't worth review time.
WalletModel::UnlockContext seems to implement "move upon copy" semantics; with C++11 this can be done more safely using move semantics (making attempts to actually copy fail instead).
Not a big deal if this isn't worth review time.
<!--e57a25ab6845829454e8d69fc972939a-->
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers.
<!--174a7506f384e20aa4161008e828411d-->
Reviewers, this pull request conflicts with the following ones:
If you consider this pull request important, please also help to review the conflicting pull requests. Ideally, start with the one that should be merged first.
481 | @@ -482,7 +482,7 @@ WalletModel::UnlockContext::~UnlockContext() 482 | } 483 | } 484 | 485 | -void WalletModel::UnlockContext::CopyFrom(const UnlockContext& rhs) 486 | +void WalletModel::UnlockContext::CopyFrom(UnlockContext&& rhs) 487 | { 488 | // Transfer context; old object no longer relocks wallet 489 | *this = rhs;
Is this calling UnlockContext& operator=(UnlockContext&& rhs)?
No, this calls the (private) default copy constructor.
Because the rvalue arg becomes an lvalue once it's named (at the beginning of the function).
utACK 0b09a57aec4c56712711585a4314d73d4d9b6877
utACK 0b09a57aec4c56712711585a4314d73d4d9b6877