summaryrefslogtreecommitdiff
path: root/src/resources/imagewriter.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-05-08 22:47:30 +0300
committerAndrei Karas <akaras@inbox.ru>2014-05-08 22:47:30 +0300
commit64aabf79b5a10bdf8192bb1048804a3e36730905 (patch)
treeab7f8a82228acd617ec178f04d7ca6bb09f727de /src/resources/imagewriter.cpp
parent3f9d0c023f3d84de0c68dbf9f7c29aa1b0abb9c9 (diff)
downloadmanaplus-64aabf79b5a10bdf8192bb1048804a3e36730905.tar.gz
manaplus-64aabf79b5a10bdf8192bb1048804a3e36730905.tar.bz2
manaplus-64aabf79b5a10bdf8192bb1048804a3e36730905.tar.xz
manaplus-64aabf79b5a10bdf8192bb1048804a3e36730905.zip
Fix code style in resources.
Diffstat (limited to 'src/resources/imagewriter.cpp')
-rw-r--r--src/resources/imagewriter.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/resources/imagewriter.cpp b/src/resources/imagewriter.cpp
index 65e3a7dbe..9ff87c758 100644
--- a/src/resources/imagewriter.cpp
+++ b/src/resources/imagewriter.cpp
@@ -84,7 +84,8 @@ bool ImageWriter::writePNG(SDL_Surface *const surface,
png_set_packing(png_ptr);
- png_bytep *const row_pointers = new png_bytep[surface->h];
+ png_bytep *const row_pointers
+ = new png_bytep[static_cast<size_t>(surface->h)];
/*
if (!row_pointers)
{
@@ -97,7 +98,7 @@ bool ImageWriter::writePNG(SDL_Surface *const surface,
for (int i = 0; i < surface->h; i++)
{
row_pointers[i] = static_cast<png_bytep>(static_cast<uint8_t *>(
- surface->pixels)) + i * surface->pitch;
+ surface->pixels) + static_cast<size_t>(i * surface->pitch));
}
png_write_image(png_ptr, row_pointers);