From 9fe21fcd8883b37bdc30224822e6e42afb35b8f0 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 7 Feb 2016 16:18:13 +0300 Subject: Replace most static_cast to shorter versions from defines. --- src/resources/imagewriter.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/resources/imagewriter.cpp') diff --git a/src/resources/imagewriter.cpp b/src/resources/imagewriter.cpp index 50db9b867..e599af156 100644 --- a/src/resources/imagewriter.cpp +++ b/src/resources/imagewriter.cpp @@ -83,7 +83,7 @@ bool ImageWriter::writePNG(SDL_Surface *const surface, png_set_packing(png_ptr); png_bytep *const row_pointers - = new png_bytep[static_cast(surface->h)]; + = new png_bytep[CAST_SIZE(surface->h)]; /* if (!row_pointers) { @@ -96,7 +96,7 @@ bool ImageWriter::writePNG(SDL_Surface *const surface, for (int i = 0; i < surface->h; i++) { row_pointers[i] = static_cast(static_cast( - surface->pixels) + static_cast(i * surface->pitch)); + surface->pixels) + CAST_SIZE(i * surface->pitch)); } png_write_image(png_ptr, row_pointers); -- cgit v1.2.3-70-g09d2