]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/signal/signal.cpp
Callback: remove fixed-arity wrappers
[xonotic/netradiant.git] / libs / signal / signal.cpp
index 6c64cf8856afc7271caa6151b288c35e84ffab55..caade86b928ecdce01e397357f2f947688ffb9f6 100644 (file)
@@ -21,39 +21,39 @@ class A3
 SignalHandlerResult handler0( Test& ){
        return SIGNAL_CONTINUE_EMISSION;
 }
-typedef Function1<Test&, SignalHandlerResult, handler0> TestHandler0;
+typedef Function<SignalHandlerResult(Test&), handler0> TestHandler0;
 
 int function0( Test& ){
        return 7;
 }
-typedef Function1<Test&, int, function0> TestFunction0;
+typedef Function<int(Test&), function0> TestFunction0;
 
 SignalHandlerResult handler1( Test&, A1 ){
        return SIGNAL_CONTINUE_EMISSION;
 }
-typedef Function2<Test&, A1, SignalHandlerResult, handler1> TestHandler1;
+typedef Function<SignalHandlerResult(Test&, A1), handler1> TestHandler1;
 
 void function1( Test&, A1 ){
 }
-typedef ReferenceCaller1<Test, A1, function1> TestFunction1;
+typedef ReferenceCaller<Test, void(A1), function1> TestFunction1;
 
 SignalHandlerResult handler2( Test&, A1, A2 ){
        return SIGNAL_CONTINUE_EMISSION;
 }
-typedef Function3<Test&, A1, A2, SignalHandlerResult, handler2> TestHandler2;
+typedef Function<SignalHandlerResult(Test&, A1, A2), handler2> TestHandler2;
 
 void function2( Test&, A1, A2 ){
 }
-typedef Function3<Test&, A1, A2, void, function2> TestFunction2;
+typedef Function<void(Test&, A1, A2), function2> TestFunction2;
 
 SignalHandlerResult handler3( Test&, A1, A2, A3 ){
        return SIGNAL_CONTINUE_EMISSION;
 }
-typedef Function4<Test&, A1, A2, A3, SignalHandlerResult, handler3> TestHandler3;
+typedef Function<SignalHandlerResult(Test&, A1, A2, A3), handler3> TestHandler3;
 
 void function3( Test&, A1, A2, A3 ){
 }
-typedef Function4<Test&, A1, A2, A3, void, function3> TestFunction3;
+typedef Function<void(Test&, A1, A2, A3), function3> TestFunction3;
 
 void testSignals(){
        Test test;