Skip to content

Commit

Permalink
Merge pull request #3 from CJYate/master
Browse files Browse the repository at this point in the history
Avoid MSVC compiler warning of local shadowing a member variable
  • Loading branch information
vpicaver authored Jan 9, 2024
2 parents 6c02e54 + d0ab5d9 commit 3344870
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions asyncfuture.h
Original file line number Diff line number Diff line change
Expand Up @@ -643,10 +643,10 @@ class DeferredFuture : public QObject, public QFutureInterface<T>{
// Used internally for linking to the context object.
// weakRef is used because we don't want the long lived context object to keep
// deferred alive.
auto weakRef = this->weakRef;
auto weakRef_ = this->weakRef;
QObject::connect(sender, member,
this, [weakRef]() {
auto self = weakRef.toStrongRef();
this, [weakRef_]() {
auto self = weakRef_.toStrongRef();
if (!self.isNull()) {
self->cancel();
}
Expand Down

0 comments on commit 3344870

Please sign in to comment.