diff --git a/stepmania/src/arch/Dialog/DialogDriver.h b/stepmania/src/arch/Dialog/DialogDriver.h index 4ec4e93a3c..198b93c2a9 100644 --- a/stepmania/src/arch/Dialog/DialogDriver.h +++ b/stepmania/src/arch/Dialog/DialogDriver.h @@ -24,8 +24,7 @@ struct RegisterDialogDriver RegisterDialogDriver( const istring &sName, CreateDialogDriverFn pfn ); }; #define REGISTER_DIALOG_DRIVER_CLASS( name ) \ - static DialogDriver *Create##name() { return new DialogDriver_##name; } \ - static RegisterDialogDriver register_##name( #name, Create##name ) + static RegisterDialogDriver register_##name( #name, CreateClass ) #endif diff --git a/stepmania/src/arch/InputHandler/InputHandler.h b/stepmania/src/arch/InputHandler/InputHandler.h index 5fe1375618..b840705a2c 100644 --- a/stepmania/src/arch/InputHandler/InputHandler.h +++ b/stepmania/src/arch/InputHandler/InputHandler.h @@ -75,8 +75,7 @@ struct RegisterInputHandler RegisterInputHandler( const istring &sName, CreateInputHandlerFn pfn ); }; #define REGISTER_INPUT_HANDLER_CLASS2( name, x ) \ - static InputHandler *Create##name() { return new InputHandler_##x; } \ - static RegisterInputHandler register_##name( #name, Create##name ) + static RegisterInputHandler register_##name( #name, CreateClass ) #define REGISTER_INPUT_HANDLER_CLASS( name ) REGISTER_INPUT_HANDLER_CLASS2( name, name ) diff --git a/stepmania/src/arch/Sound/RageSoundDriver.h b/stepmania/src/arch/Sound/RageSoundDriver.h index 1065acd18c..e01e2f818d 100644 --- a/stepmania/src/arch/Sound/RageSoundDriver.h +++ b/stepmania/src/arch/Sound/RageSoundDriver.h @@ -58,8 +58,7 @@ struct RegisterSoundDriver }; // Can't use Create##name because many of these have -sw suffixes. #define REGISTER_SOUND_DRIVER_CLASS2( name, x ) \ - static RageSoundDriver *Create##x() { return new RageSoundDriver_##x; } \ - static RegisterSoundDriver register_##x( #name, Create##x ) + static RegisterSoundDriver register_##x( #name, CreateClass ) #define REGISTER_SOUND_DRIVER_CLASS( name ) REGISTER_SOUND_DRIVER_CLASS2( name, name )