src/cocoa/bitmap.mm in rays-0.1.3 vs src/cocoa/bitmap.mm in rays-0.1.4
- old
+ new
@@ -202,11 +202,11 @@
}
const void*
Bitmap::data () const
{
- return const_cast<Bitmap*>(this)->data();
+ return const_cast<This*>(this)->data();
}
Bitmap::operator bool () const
{
return
@@ -231,13 +231,13 @@
if (!imagerep) return false;
CGImageRef image = [imagerep CGImage];
if (!image) return false;
- int width = CGImageGetWidth(image);
- int height = CGImageGetHeight(image);
+ size_t width = CGImageGetWidth(image);
+ size_t height = CGImageGetHeight(image);
- *bmp = Bitmap(width, height, ColorSpace(RGBA, true));
+ *bmp = Bitmap((int) width, (int) height, ColorSpace(RGBA, true));
if (!*bmp) return false;
CGContextRef context = bmp->self->get_context();
if (!context) return false;