Fixes #66 warnings

This commit is contained in:
2016-02-01 17:53:01 +01:00
parent 0a43f8104e
commit a3d4eb65d5
18 changed files with 69 additions and 68 deletions
+2 -2
View File
@@ -71,12 +71,12 @@ PNG::PNG(std::string path)
png_read_update_info(png_ptr, info_ptr);
}
unsigned int row_bytes = png_get_rowbytes(png_ptr, info_ptr);
std::size_t row_bytes = png_get_rowbytes(png_ptr, info_ptr);
this->Data = new unsigned char[height * row_bytes];
png_bytep* row_pointers = new png_bytep[height];
// Point each row to the continuous data array
for (int i = 0; i < height; ++i) {
for (unsigned int i = 0; i < height; ++i) {
// Invert Y for OpenGL
row_pointers[height - 1 - i] = this->Data + i * row_bytes;
}