File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -439,7 +439,7 @@ TEST(AlarmTest, UnsetDestruction) {
439439}
440440
441441TEST (AlarmTest, CallbackSetInCallback) {
442- auto c = std::make_shared<Completion>() ;
442+ Completion c ;
443443 std::mutex alarm_mu;
444444 Alarm alarm;
445445 {
@@ -452,14 +452,14 @@ TEST(AlarmTest, CallbackSetInCallback) {
452452 std::chrono::system_clock::now () + std::chrono::seconds (1 ),
453453 [&](bool ok) {
454454 EXPECT_TRUE (ok);
455- std::lock_guard<std::mutex> l (c-> mu );
456- c-> completed = true ;
457- c-> cv .notify_one ();
455+ std::lock_guard<std::mutex> l (c. mu );
456+ c. completed = true ;
457+ c. cv .notify_one ();
458458 });
459459 });
460460 }
461- std::unique_lock<std::mutex> l (c-> mu );
462- c-> cv .wait (l, [c ] { return c-> completed ; });
461+ std::unique_lock<std::mutex> l (c. mu );
462+ c. cv .wait (l, [& ] { return c. completed ; });
463463}
464464
465465} // namespace
You can’t perform that action at this time.
0 commit comments