X-Git-Url: http://git.xonotic.org/?a=blobdiff_plain;f=radiant%2Fundo.cpp;h=b5507c5c365abf02a41903f76e1a01bb4ea05778;hb=2a1cfc426e60b77c7b212d827e2592de01041266;hp=8277c70e4ef91bec9e41fc21f3341656bf3ebcc0;hpb=18d60f90d7603cb420150739251cf98519c57406;p=xonotic%2Fnetradiant.git diff --git a/radiant/undo.cpp b/radiant/undo.cpp index 8277c70e..b5507c5c 100644 --- a/radiant/undo.cpp +++ b/radiant/undo.cpp @@ -381,10 +381,10 @@ void UndoLevels_importString( RadiantUndoSystem& undo, const char* value ){ undo.setLevels( levels ); } typedef ReferenceCaller UndoLevelsImportStringCaller; -void UndoLevels_exportString( const RadiantUndoSystem& undo, const StringImportCallback& importer ){ +void UndoLevels_exportString( const RadiantUndoSystem& undo, const ImportExportCallback::Import_t& importer ){ Int_exportString( static_cast( undo.getLevels() ), importer ); } -typedef ConstReferenceCaller UndoLevelsExportStringCaller; +typedef ConstReferenceCaller::Import_t&), UndoLevels_exportString> UndoLevelsExportStringCaller; #include "generic/callback.h" @@ -392,14 +392,14 @@ void UndoLevelsImport( RadiantUndoSystem& self, int value ){ self.setLevels( value ); } typedef ReferenceCaller UndoLevelsImportCaller; -void UndoLevelsExport( const RadiantUndoSystem& self, const IntImportCallback& importCallback ){ +void UndoLevelsExport( const RadiantUndoSystem& self, const ImportExportCallback::Import_t& importCallback ){ importCallback( static_cast( self.getLevels() ) ); } -typedef ConstReferenceCaller UndoLevelsExportCaller; +typedef ConstReferenceCaller::Import_t&), UndoLevelsExport> UndoLevelsExportCaller; void Undo_constructPreferences( RadiantUndoSystem& undo, PreferencesPage& page ){ - page.appendSpinner( "Undo Queue Size", 64, 0, 1024, IntImportCallback( UndoLevelsImportCaller( undo ) ), IntExportCallback( UndoLevelsExportCaller( undo ) ) ); + page.appendSpinner( "Undo Queue Size", 64, 0, 1024, {ImportExportCallback::Import_t( UndoLevelsImportCaller( undo ) ), ImportExportCallback::Export_t( UndoLevelsExportCaller( undo ) )} ); } void Undo_constructPage( RadiantUndoSystem& undo, PreferenceGroup& group ){ PreferencesPage page( group.createPage( "Undo", "Undo Queue Settings" ) );