Merge pull request #243 from Erroneous1/bug/miniz_const

fix -Wcast-qual in miniz
This commit is contained in:
Thomas Fussell 2017-12-08 13:59:32 -05:00 committed by GitHub
commit e261743032
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -2095,7 +2095,7 @@ void *tdefl_write_image_to_png_file_in_memory_ex(const void *pImage, int w, int
for (y = 0; y < h; ++y) for (y = 0; y < h; ++y)
{ {
tdefl_compress_buffer(pComp, &z, 1, TDEFL_NO_FLUSH); tdefl_compress_buffer(pComp, &z, 1, TDEFL_NO_FLUSH);
tdefl_compress_buffer(pComp, (mz_uint8 *)pImage + (flip ? (h - 1 - y) : y) * bpl, bpl, TDEFL_NO_FLUSH); tdefl_compress_buffer(pComp, (const mz_uint8 *)pImage + (flip ? (h - 1 - y) : y) * bpl, bpl, TDEFL_NO_FLUSH);
} }
if (tdefl_compress_buffer(pComp, nullptr, 0, TDEFL_FINISH) != TDEFL_STATUS_DONE) if (tdefl_compress_buffer(pComp, nullptr, 0, TDEFL_FINISH) != TDEFL_STATUS_DONE)
{ {