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
|
@ -43,15 +43,6 @@ static VALUE Glyph_Initialize( VALUE self )
|
|||
return self;
|
||||
}
|
||||
|
||||
static VALUE Glyph_InitializeCopy( VALUE self, VALUE aSource )
|
||||
{
|
||||
sf::Glyph *object = NULL;
|
||||
Data_Get_Struct( self, sf::Glyph, object );
|
||||
sf::Glyph *source = NULL;
|
||||
Data_Get_Struct( aSource, sf::Glyph, source );
|
||||
*object = *source;
|
||||
}
|
||||
|
||||
void Init_Glyph( void )
|
||||
{
|
||||
/* SFML namespace which contains the classes of this module. */
|
||||
|
@ -70,7 +61,6 @@ void Init_Glyph( void )
|
|||
|
||||
// Instance methods
|
||||
rb_define_method( globalGlyphClass, "initialize", Glyph_Initialize, 0 );
|
||||
rb_define_method( globalGlyphClass, "initialize_copy", Glyph_InitializeCopy, 1 );
|
||||
|
||||
// Attribute accessors
|
||||
rb_define_attr( globalGlyphClass, "advance", 1, 1 );
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue