Skip to content

Commit 73a73c5

Browse files
committed
async_testing.h: capture shared_from_this() more efficiently
1 parent 2b0cb73 commit 73a73c5

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

Firestore/core/test/unit/testutil/async_testing.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,7 @@ class AsyncAccumulator final
232232
* `AccumulateObject()`.
233233
*/
234234
std::function<void(const T&)> AsCallback() {
235-
auto shared_this = this->shared_from_this();
236-
return [shared_this](const T& object) {
235+
return [shared_this = this->shared_from_this()](const T& object) {
237236
shared_this->AccumulateObject(object);
238237
};
239238
}

0 commit comments

Comments
 (0)