Concerned changes is that the 'true' values had to be Qtrue or I would be doing an invalid comparison.

git-svn-id: https://sfml.svn.sourceforge.net/svnroot/sfml/branches/sfml2@1654 4e206d99-4929-0410-ac5d-dfc041789085
This commit is contained in:
groogy 2010-11-16 09:17:50 +00:00
parent 23fd179d8b
commit 1c9e5ff5a2
3 changed files with 6 additions and 6 deletions

View File

@ -48,13 +48,13 @@ VALUE globalVector2Class;
*/ */
VALUE Vector2_ForceType( VALUE someValue ) VALUE Vector2_ForceType( VALUE someValue )
{ {
if( rb_obj_is_kind_of( someValue, rb_cArray ) == true ) if( rb_obj_is_kind_of( someValue, rb_cArray ) == Qtrue )
{ {
VALUE arg1 = rb_ary_entry( someValue, 0 ); VALUE arg1 = rb_ary_entry( someValue, 0 );
VALUE arg2 = rb_ary_entry( someValue, 1 ); VALUE arg2 = rb_ary_entry( someValue, 1 );
return rb_funcall( globalVector2Class, rb_intern( "new" ), 2, arg1, arg2 ); return rb_funcall( globalVector2Class, rb_intern( "new" ), 2, arg1, arg2 );
} }
else if( rb_obj_is_kind_of( someValue, globalVector2Class ) == true ) else if( rb_obj_is_kind_of( someValue, globalVector2Class ) == Qtrue )
{ {
return someValue; return someValue;
} }

View File

@ -48,14 +48,14 @@ VALUE globalVector3Class;
*/ */
VALUE Vector3_ForceType( VALUE someValue ) VALUE Vector3_ForceType( VALUE someValue )
{ {
if( rb_obj_is_kind_of( someValue, rb_cArray ) == true ) if( rb_obj_is_kind_of( someValue, rb_cArray ) == Qtrue )
{ {
VALUE arg1 = rb_ary_entry( someValue, 0 ); VALUE arg1 = rb_ary_entry( someValue, 0 );
VALUE arg2 = rb_ary_entry( someValue, 1 ); VALUE arg2 = rb_ary_entry( someValue, 1 );
VALUE arg3 = rb_ary_entry( someValue, 2 ); VALUE arg3 = rb_ary_entry( someValue, 2 );
return rb_funcall( globalVector3Class, rb_intern( "new" ), 3, arg1, arg2, arg3 ); return rb_funcall( globalVector3Class, rb_intern( "new" ), 3, arg1, arg2, arg3 );
} }
else if( rb_obj_is_kind_of( someValue, globalVector3Class ) == true ) else if( rb_obj_is_kind_of( someValue, globalVector3Class ) == Qtrue )
{ {
return someValue; return someValue;
} }

View File

@ -64,7 +64,7 @@ VALUE globalVideoModeClass;
*/ */
VALUE VideoMode_ForceType( VALUE someValue ) VALUE VideoMode_ForceType( VALUE someValue )
{ {
if( rb_obj_is_kind_of( someValue, rb_cArray ) == true ) if( rb_obj_is_kind_of( someValue, rb_cArray ) == Qtrue )
{ {
VALUE arg1 = rb_ary_entry( someValue, 0 ); VALUE arg1 = rb_ary_entry( someValue, 0 );
VALUE arg2 = rb_ary_entry( someValue, 1 ); VALUE arg2 = rb_ary_entry( someValue, 1 );
@ -78,7 +78,7 @@ VALUE VideoMode_ForceType( VALUE someValue )
return rb_funcall( globalVideoModeClass, rb_intern( "new" ), 2, arg1, arg2 ); return rb_funcall( globalVideoModeClass, rb_intern( "new" ), 2, arg1, arg2 );
} }
} }
else if( rb_obj_is_kind_of( someValue, globalVideoModeClass ) == true ) else if( rb_obj_is_kind_of( someValue, globalVideoModeClass ) == Qtrue )
{ {
return someValue; return someValue;
} }