diff options
author | Gil <mcg@google.com> | 2018-05-13 21:02:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-13 21:02:46 -0700 |
commit | ee1307474df402231b677738cf28dc693dd17c06 (patch) | |
tree | 31511b0c444f76467345896258efccaaac95cc31 /Firestore/Source | |
parent | 97dc3a3f6717ab2932ceb7975367f3f4fe6fbce6 (diff) |
Clean up implicit retain self warnings introduced recently (#1268)
Diffstat (limited to 'Firestore/Source')
-rw-r--r-- | Firestore/Source/Core/FSTFirestoreClient.mm | 29 | ||||
-rw-r--r-- | Firestore/Source/Util/FSTAsyncQueryListener.mm | 2 |
2 files changed, 16 insertions, 15 deletions
diff --git a/Firestore/Source/Core/FSTFirestoreClient.mm b/Firestore/Source/Core/FSTFirestoreClient.mm index 93d1f7c..cede958 100644 --- a/Firestore/Source/Core/FSTFirestoreClient.mm +++ b/Firestore/Source/Core/FSTFirestoreClient.mm @@ -239,7 +239,7 @@ NS_ASSUME_NONNULL_BEGIN [self.workerDispatchQueue dispatchAsync:^{ [self.remoteStore disableNetwork]; if (completion) { - _userExecutor->Execute([=] { completion(nil); }); + self->_userExecutor->Execute([=] { completion(nil); }); } }]; } @@ -248,7 +248,7 @@ NS_ASSUME_NONNULL_BEGIN [self.workerDispatchQueue dispatchAsync:^{ [self.remoteStore enableNetwork]; if (completion) { - _userExecutor->Execute([=] { completion(nil); }); + self->_userExecutor->Execute([=] { completion(nil); }); } }]; } @@ -260,7 +260,7 @@ NS_ASSUME_NONNULL_BEGIN [self.remoteStore shutdown]; [self.persistence shutdown]; if (completion) { - _userExecutor->Execute([=] { completion(nil); }); + self->_userExecutor->Execute([=] { completion(nil); }); } }]; } @@ -341,14 +341,14 @@ NS_ASSUME_NONNULL_BEGIN [self.workerDispatchQueue dispatchAsync:^{ if (mutations.count == 0) { if (completion) { - _userExecutor->Execute([=] { completion(nil); }); + self->_userExecutor->Execute([=] { completion(nil); }); } } else { [self.syncEngine writeMutations:mutations completion:^(NSError *error) { // Dispatch the result back onto the user dispatch queue. if (completion) { - _userExecutor->Execute([=] { completion(error); }); + self->_userExecutor->Execute([=] { completion(error); }); } }]; } @@ -359,15 +359,16 @@ NS_ASSUME_NONNULL_BEGIN updateBlock:(FSTTransactionBlock)updateBlock completion:(FSTVoidIDErrorBlock)completion { [self.workerDispatchQueue dispatchAsync:^{ - [self.syncEngine transactionWithRetries:retries - workerDispatchQueue:self.workerDispatchQueue - updateBlock:updateBlock - completion:^(id _Nullable result, NSError *_Nullable error) { - // Dispatch the result back onto the user dispatch queue. - if (completion) { - _userExecutor->Execute([=] { completion(result, error); }); - } - }]; + [self.syncEngine + transactionWithRetries:retries + workerDispatchQueue:self.workerDispatchQueue + updateBlock:updateBlock + completion:^(id _Nullable result, NSError *_Nullable error) { + // Dispatch the result back onto the user dispatch queue. + if (completion) { + self->_userExecutor->Execute([=] { completion(result, error); }); + } + }]; }]; } diff --git a/Firestore/Source/Util/FSTAsyncQueryListener.mm b/Firestore/Source/Util/FSTAsyncQueryListener.mm index 426594b..81dd41f 100644 --- a/Firestore/Source/Util/FSTAsyncQueryListener.mm +++ b/Firestore/Source/Util/FSTAsyncQueryListener.mm @@ -42,7 +42,7 @@ using firebase::firestore::util::internal::Executor; // users just want to turn on notifications "forever" and don't want to have // to keep track of our handle to keep them going. return ^(FSTViewSnapshot *_Nullable snapshot, NSError *_Nullable error) { - _executor->Execute([self, snapshot, error] { + self->_executor->Execute([self, snapshot, error] { if (!self->_muted) { self->_snapshotHandler(snapshot, error); } |