Skip to content

Commit 25ca5d2

Browse files
authored
Merge pull request #11880 from kjbracey-arm/callback_variadic
Remove deprecated Callback methods
2 parents 40cf725 + 0b28553 commit 25ca5d2

File tree

4 files changed

+18
-404
lines changed

4 files changed

+18
-404
lines changed

TESTS/mbed_functional/callback/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -526,7 +526,7 @@ void test_dispatch0()
526526
Verifier<T>::verify0(cb);
527527
cb = static_func0;
528528
Verifier<T>::verify0(cb);
529-
cb.attach(&bound_func0<T>, &thing);
529+
cb = {&bound_func0<T>, &thing};
530530
Verifier<T>::verify0(&cb, &Callback<T()>::call);
531531
Verifier<T>::verify0(&Callback<T()>::thunk, (void *)&cb);
532532
}
@@ -557,7 +557,7 @@ void test_dispatch1()
557557
Verifier<T>::verify1(cb);
558558
cb = static_func1;
559559
Verifier<T>::verify1(cb);
560-
cb.attach(&bound_func1<T>, &thing);
560+
cb = {&bound_func1<T>, &thing};
561561
Verifier<T>::verify1(&cb, &Callback<T(T)>::call);
562562
Verifier<T>::verify1(&Callback<T(T)>::thunk, (void *)&cb);
563563
}
@@ -588,7 +588,7 @@ void test_dispatch2()
588588
Verifier<T>::verify2(cb);
589589
cb = static_func2;
590590
Verifier<T>::verify2(cb);
591-
cb.attach(&bound_func2<T>, &thing);
591+
cb = {&bound_func2<T>, &thing};
592592
Verifier<T>::verify2(&cb, &Callback<T(T, T)>::call);
593593
Verifier<T>::verify2(&Callback<T(T, T)>::thunk, (void *)&cb);
594594
}
@@ -619,7 +619,7 @@ void test_dispatch3()
619619
Verifier<T>::verify3(cb);
620620
cb = static_func3;
621621
Verifier<T>::verify3(cb);
622-
cb.attach(&bound_func3<T>, &thing);
622+
cb = {&bound_func3<T>, &thing};
623623
Verifier<T>::verify3(&cb, &Callback<T(T, T, T)>::call);
624624
Verifier<T>::verify3(&Callback<T(T, T, T)>::thunk, (void *)&cb);
625625
}
@@ -650,7 +650,7 @@ void test_dispatch4()
650650
Verifier<T>::verify4(cb);
651651
cb = static_func4;
652652
Verifier<T>::verify4(cb);
653-
cb.attach(&bound_func4<T>, &thing);
653+
cb = {&bound_func4<T>, &thing};
654654
Verifier<T>::verify4(&cb, &Callback<T(T, T, T, T)>::call);
655655
Verifier<T>::verify4(&Callback<T(T, T, T, T)>::thunk, (void *)&cb);
656656
}
@@ -681,7 +681,7 @@ void test_dispatch5()
681681
Verifier<T>::verify5(cb);
682682
cb = static_func5;
683683
Verifier<T>::verify5(cb);
684-
cb.attach(&bound_func5<T>, &thing);
684+
cb = {&bound_func5<T>, &thing};
685685
Verifier<T>::verify5(&cb, &Callback<T(T, T, T, T, T)>::call);
686686
Verifier<T>::verify5(&Callback<T(T, T, T, T, T)>::thunk, (void *)&cb);
687687
}

TESTS/mbed_functional/callback_big/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ void test_dispatch0()
398398
Verifier<T>::verify0(cb);
399399
cb = static_func0;
400400
Verifier<T>::verify0(cb);
401-
cb.attach(&bound_func0<T>, &thing);
401+
cb = {&bound_func0<T>, &thing};
402402
Verifier<T>::verify0(&cb, &Callback<T()>::call);
403403
Verifier<T>::verify0(&Callback<T()>::thunk, (void *)&cb);
404404
}
@@ -422,7 +422,7 @@ void test_dispatch1()
422422
Verifier<T>::verify1(cb);
423423
cb = static_func1;
424424
Verifier<T>::verify1(cb);
425-
cb.attach(&bound_func1<T>, &thing);
425+
cb = {&bound_func1<T>, &thing};
426426
Verifier<T>::verify1(&cb, &Callback<T(T)>::call);
427427
Verifier<T>::verify1(&Callback<T(T)>::thunk, (void *)&cb);
428428
}
@@ -446,7 +446,7 @@ void test_dispatch2()
446446
Verifier<T>::verify2(cb);
447447
cb = static_func2;
448448
Verifier<T>::verify2(cb);
449-
cb.attach(&bound_func2<T>, &thing);
449+
cb = {&bound_func2<T>, &thing};
450450
Verifier<T>::verify2(&cb, &Callback<T(T, T)>::call);
451451
Verifier<T>::verify2(&Callback<T(T, T)>::thunk, (void *)&cb);
452452
}
@@ -470,7 +470,7 @@ void test_dispatch3()
470470
Verifier<T>::verify3(cb);
471471
cb = static_func3;
472472
Verifier<T>::verify3(cb);
473-
cb.attach(&bound_func3<T>, &thing);
473+
cb = {&bound_func3<T>, &thing};
474474
Verifier<T>::verify3(&cb, &Callback<T(T, T, T)>::call);
475475
Verifier<T>::verify3(&Callback<T(T, T, T)>::thunk, (void *)&cb);
476476
}
@@ -494,7 +494,7 @@ void test_dispatch4()
494494
Verifier<T>::verify4(cb);
495495
cb = static_func4;
496496
Verifier<T>::verify4(cb);
497-
cb.attach(&bound_func4<T>, &thing);
497+
cb = {&bound_func4<T>, &thing};
498498
Verifier<T>::verify4(&cb, &Callback<T(T, T, T, T)>::call);
499499
Verifier<T>::verify4(&Callback<T(T, T, T, T)>::thunk, (void *)&cb);
500500
}
@@ -518,7 +518,7 @@ void test_dispatch5()
518518
Verifier<T>::verify5(cb);
519519
cb = static_func5;
520520
Verifier<T>::verify5(cb);
521-
cb.attach(&bound_func5<T>, &thing);
521+
cb = {&bound_func5<T>, &thing};
522522
Verifier<T>::verify5(&cb, &Callback<T(T, T, T, T, T)>::call);
523523
Verifier<T>::verify5(&Callback<T(T, T, T, T, T)>::thunk, (void *)&cb);
524524
}

TESTS/mbed_functional/callback_small/main.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -398,7 +398,7 @@ void test_dispatch0()
398398
Verifier<T>::verify0(cb);
399399
cb = static_func0;
400400
Verifier<T>::verify0(cb);
401-
cb.attach(&bound_func0<T>, &thing);
401+
cb = {&bound_func0<T>, &thing};
402402
Verifier<T>::verify0(&cb, &Callback<T()>::call);
403403
Verifier<T>::verify0(&Callback<T()>::thunk, (void *)&cb);
404404
}
@@ -422,7 +422,7 @@ void test_dispatch1()
422422
Verifier<T>::verify1(cb);
423423
cb = static_func1;
424424
Verifier<T>::verify1(cb);
425-
cb.attach(&bound_func1<T>, &thing);
425+
cb = {&bound_func1<T>, &thing};
426426
Verifier<T>::verify1(&cb, &Callback<T(T)>::call);
427427
Verifier<T>::verify1(&Callback<T(T)>::thunk, (void *)&cb);
428428
}
@@ -446,7 +446,7 @@ void test_dispatch2()
446446
Verifier<T>::verify2(cb);
447447
cb = static_func2;
448448
Verifier<T>::verify2(cb);
449-
cb.attach(&bound_func2<T>, &thing);
449+
cb = {&bound_func2<T>, &thing};
450450
Verifier<T>::verify2(&cb, &Callback<T(T, T)>::call);
451451
Verifier<T>::verify2(&Callback<T(T, T)>::thunk, (void *)&cb);
452452
}
@@ -470,7 +470,7 @@ void test_dispatch3()
470470
Verifier<T>::verify3(cb);
471471
cb = static_func3;
472472
Verifier<T>::verify3(cb);
473-
cb.attach(&bound_func3<T>, &thing);
473+
cb = {&bound_func3<T>, &thing};
474474
Verifier<T>::verify3(&cb, &Callback<T(T, T, T)>::call);
475475
Verifier<T>::verify3(&Callback<T(T, T, T)>::thunk, (void *)&cb);
476476
}
@@ -494,7 +494,7 @@ void test_dispatch4()
494494
Verifier<T>::verify4(cb);
495495
cb = static_func4;
496496
Verifier<T>::verify4(cb);
497-
cb.attach(&bound_func4<T>, &thing);
497+
cb = {&bound_func4<T>, &thing};
498498
Verifier<T>::verify4(&cb, &Callback<T(T, T, T, T)>::call);
499499
Verifier<T>::verify4(&Callback<T(T, T, T, T)>::thunk, (void *)&cb);
500500
}
@@ -518,7 +518,7 @@ void test_dispatch5()
518518
Verifier<T>::verify5(cb);
519519
cb = static_func5;
520520
Verifier<T>::verify5(cb);
521-
cb.attach(&bound_func5<T>, &thing);
521+
cb = {&bound_func5<T>, &thing};
522522
Verifier<T>::verify5(&cb, &Callback<T(T, T, T, T, T)>::call);
523523
Verifier<T>::verify5(&Callback<T(T, T, T, T, T)>::thunk, (void *)&cb);
524524
}

0 commit comments

Comments
 (0)