]> de.git.xonotic.org Git - xonotic/netradiant.git/blobdiff - libs/generic/callback.cpp
Callback: cleanup
[xonotic/netradiant.git] / libs / generic / callback.cpp
index 4776f57589e37db97bc786817b37c25ed030db80..423efcea500e12a9383e4876fb8152654314d650 100644 (file)
@@ -153,10 +153,8 @@ typedef ConstMember<Test, void(A1, A2, A3), &Test::test3const> Test3Const;
 
 void test0free(){
 }
-typedef FreeCaller<void(), &test0free> Test0FreeCaller;
 void test1free( A1 ){
 }
-typedef FreeCaller<void(A1), &test1free> Test1FreeCaller;
 void test2free( A1, A2 ){
 }
 typedef Function<void(A1, A2), &test2free> Test2Free;
@@ -209,7 +207,7 @@ void instantiate(){
        Test test;
        const Test& testconst = test;
        {
-               Callback<void()> a = Test0FreeCaller();
+               Callback<void()> a = makeCallbackF(&test0free)();
                Callback<void()> b = Test::Test0Caller( test );
                b = makeCallback( Test::Test0(), test );
                Callback<void()> c = Test::Test0ConstCaller( testconst );
@@ -223,7 +221,7 @@ void instantiate(){
        }
        {
                typedef Callback<void(A1)> TestCallback1;
-               TestCallback1 a = Test1FreeCaller();
+               TestCallback1 a = makeCallbackF(&test1free));
                TestCallback1 b = Test::Test1Caller( test );
                b = makeCallback( Test::Test1(), test );
                TestCallback1 c = Test::Test1ConstCaller( testconst );