]> git.xonotic.org Git - xonotic/netradiant.git/blobdiff - radiant/dialog.cpp
Callback: remove fixed-arity wrappers
[xonotic/netradiant.git] / radiant / dialog.cpp
index 99d6d79b22bdd5d349b6a885a670a3a6afed3984..bb8705f2446191bbf78b4a431c9bf6586d471938 100644 (file)
@@ -112,7 +112,7 @@ template<
        typename Type_,
        typename Other_,
        void( *Import ) ( Type_&, Other_ ),
-       void( *Export ) ( Type_&, const Callback1<Other_>& )
+       void( *Export ) ( Type_&, const Callback<void(Other_)>& )
        >
 class ImportExport
 {
@@ -120,8 +120,8 @@ public:
 typedef Type_ Type;
 typedef Other_ Other;
 
-typedef ReferenceCaller1<Type, Other, Import> ImportCaller;
-typedef ReferenceCaller1<Type, const Callback1<Other>&, Export> ExportCaller;
+typedef ReferenceCaller<Type, void(Other), Import> ImportCaller;
+typedef ReferenceCaller<Type, void(const Callback<void(Other)>&), Export> ExportCaller;
 };
 
 typedef ImportExport<bool, bool, BoolImport, BoolExport> BoolImportExport;
@@ -229,8 +229,8 @@ template<typename FirstArgument>
 class CallbackDialogData : public DLG_DATA
 {
 public:
-typedef Callback1<FirstArgument> ImportCallback;
-typedef Callback1<const ImportCallback&> ExportCallback;
+typedef Callback<void(FirstArgument)> ImportCallback;
+typedef Callback<void(const ImportCallback&)> ExportCallback;
 
 private:
 ImportCallback m_importWidget;
@@ -281,8 +281,8 @@ AddCustomData( DialogDataList& data ) : m_data( data ){
 }
 void apply(
        typename Widget::Type& widget,
-       const Callback1<typename Widget::Other>& importViewer,
-       const Callback1<const Callback1<typename Widget::Other>&>& exportViewer
+       const Callback<void(typename Widget::Other)>& importViewer,
+       const Callback<void(const Callback<void(typename Widget::Other)>&)>& exportViewer
        ) const {
        m_data.push_back(
                new CallbackDialogData<typename Widget::Other>(