Fixed some obvious mistakes and applied strict type checking to SurfaceCollections too

This commit is contained in:
Alessandro Ranellucci 2014-01-16 19:02:50 +01:00
parent a831f5b176
commit 3a3e53b59b
5 changed files with 20 additions and 7 deletions

View file

@ -22,7 +22,7 @@ SurfaceCollection::new(...)
RETVAL->surfaces.resize(items-1);
for (unsigned int i = 1; i < items; i++) {
// Note: a COPY of the input is stored
RETVAL->surfaces[i-1] = *(Surface *)SvIV((SV*)SvRV( ST(i) ));
RETVAL->surfaces[i-1].from_SV_check(ST(i));
}
OUTPUT:
RETVAL
@ -56,8 +56,9 @@ void
SurfaceCollection::append(...)
CODE:
for (unsigned int i = 1; i < items; i++) {
// Note: a COPY of the input is stored
THIS->surfaces.push_back(*(Surface *)SvIV((SV*)SvRV( ST(i) )));
Surface surface;
surface.from_SV_check( ST(i) );
THIS->surfaces.push_back(surface);
}
void