Some refactoring, moved C++ allocation into the *_Alloc function instead of directly in new, removed new in most of classes too. Cloning should work on all copyable classes now.
git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1802 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
parent
0a2abc6933
commit
7d7c4c999f
26 changed files with 235 additions and 301 deletions
|
@ -237,13 +237,9 @@ static VALUE SoundSource_SetVolume( VALUE self, VALUE aValue )
|
|||
return Qnil;
|
||||
}
|
||||
|
||||
static VALUE SoundSource_InitializeCopy( VALUE self, VALUE aSource )
|
||||
static VALUE SoundSource_Initialize( VALUE self )
|
||||
{
|
||||
sf::SoundSource *object = NULL;
|
||||
Data_Get_Struct( self, sf::SoundSource, object );
|
||||
sf::SoundSource *source = NULL;
|
||||
Data_Get_Struct( aSource, sf::SoundSource, source );
|
||||
*object = *source;
|
||||
rb_raise( rb_eNotImpError, "Trying to construct instance of abstract class" );
|
||||
}
|
||||
|
||||
static void DefineStatusEnum( void )
|
||||
|
@ -269,7 +265,6 @@ void Init_SoundSource( void )
|
|||
DefineStatusEnum();
|
||||
|
||||
// Instance methods
|
||||
rb_define_method( globalSoundSourceClass, "initialize_copy", SoundSource_InitializeCopy, 1 );
|
||||
rb_define_method( globalSoundSourceClass, "getAttenuation", SoundSource_GetAttenuation, 0 );
|
||||
rb_define_method( globalSoundSourceClass, "getMinDistance", SoundSource_GetMinDistance, 0 );
|
||||
rb_define_method( globalSoundSourceClass, "getPitch", SoundSource_GetPitch, 0 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue