Also had forgotten two breaks in a switch-statement in View.cpp

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1727 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-11-29 15:44:02 +00:00
parent 4de4d0832c
commit fef70e1280
4 changed files with 149 additions and 3 deletions

View file

@ -38,6 +38,11 @@ extern VALUE globalDrawableModule;
extern VALUE globalShaderClass;
extern VALUE globalViewClass;
static VALUE View_Free( sf::View *anObject )
{
delete anObject;
}
/* call-seq:
* render_target.clear( color = SFML::Color::Black )
*
@ -178,10 +183,10 @@ static VALUE RenderTarget_GetView( VALUE self )
{
sf::RenderTarget *object = NULL;
Data_Get_Struct( self, sf::RenderTarget, object );
const sf::View &view = object->GetView();
VALUE rbData = Data_Wrap_Struct( globalViewClass, 0, 0, const_cast< sf::View * >( &view ) );
const sf::View &original = object->GetView();
sf::View * view = new sf::View( original );
VALUE rbData = Data_Wrap_Struct( globalViewClass, 0, View_Free, view );
rb_obj_call_init( rbData, 0, 0 );
rb_iv_set( rbData, "@__owner_ref", self );
return rbData;
}