mirror of
https://github.com/gbdev/rgbds.git
synced 2026-08-21 22:34:32 +00:00
Use const_cast more precisely to remove const without changing type
This commit is contained in:
+2
-2
@@ -420,7 +420,7 @@ void reverse() {
|
||||
}
|
||||
png_structp png = png_create_write_struct(
|
||||
PNG_LIBPNG_VER_STRING,
|
||||
const_cast<png_voidp>(static_cast<void const *>(pngFile.c_str(options.input))),
|
||||
const_cast<char *>(pngFile.c_str(options.input)),
|
||||
pngError,
|
||||
pngWarning
|
||||
);
|
||||
@@ -572,7 +572,7 @@ void reverse() {
|
||||
// signature.
|
||||
// (AIUI, casting away const-ness is okay as long as you don't actually modify the
|
||||
// pointed-to data)
|
||||
png_write_rows(png, const_cast<png_bytepp>(rowPtrs), 8);
|
||||
png_write_rows(png, const_cast<uint8_t **>(rowPtrs), 8);
|
||||
}
|
||||
|
||||
// Finalize the write
|
||||
|
||||
Reference in New Issue
Block a user