diff options
author | Wolfgang Schupp <w.schupp@a1.net> | 2017-11-09 15:17:42 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-09 15:17:42 +0100 |
commit | 2a89e2d9babe5134fd9d6ef9cd9c4b0089ab4d23 (patch) | |
tree | 474b234f8a8f12ad1290113b238aa0d713f0fb03 /tools | |
parent | e3c2ed9f8d3bba1f3ab6021df4c05be7e4f2e949 (diff) | |
parent | ee441543be07de1222bcff2587bfcdb5c1231989 (diff) |
Merge pull request #13015 from MilhouseVH/texturepacker_exception_fix
TexturePacker: exception fix
Diffstat (limited to 'tools')
7 files changed, 11 insertions, 13 deletions
diff --git a/tools/depends/native/TexturePacker/src/SimpleFS.h b/tools/depends/native/TexturePacker/src/SimpleFS.h index c48814c0ad..c2288cf8de 100644 --- a/tools/depends/native/TexturePacker/src/SimpleFS.h +++ b/tools/depends/native/TexturePacker/src/SimpleFS.h @@ -20,9 +20,9 @@ * */ -#include <stdio.h> +#include <cstdio> #include <string> -#include <stdint.h> +#include <cstdint> class CFile { diff --git a/tools/depends/native/TexturePacker/src/TexturePacker.cpp b/tools/depends/native/TexturePacker/src/TexturePacker.cpp index ba618be574..045c5ce38d 100644 --- a/tools/depends/native/TexturePacker/src/TexturePacker.cpp +++ b/tools/depends/native/TexturePacker/src/TexturePacker.cpp @@ -22,7 +22,7 @@ #include <sys/types.h> #include <sys/stat.h> #define __STDC_FORMAT_MACROS -#include <inttypes.h> +#include <cinttypes> #define platform_stricmp _stricmp #else #define platform_stricmp stricmp diff --git a/tools/depends/native/TexturePacker/src/XBTFWriter.cpp b/tools/depends/native/TexturePacker/src/XBTFWriter.cpp index 9e2493369b..2e80ba674c 100644 --- a/tools/depends/native/TexturePacker/src/XBTFWriter.cpp +++ b/tools/depends/native/TexturePacker/src/XBTFWriter.cpp @@ -19,14 +19,14 @@ */ #define __STDC_FORMAT_MACROS -#include <inttypes.h> +#include <cinttypes> #if defined(TARGET_FREEBSD) || defined(TARGET_DARWIN) -#include <stdlib.h> +#include <cstdlib> #elif !defined(TARGET_DARWIN) #include <malloc.h> #endif #include <memory.h> -#include <string.h> +#include <cstring> #include "XBTFWriter.h" #include "guilib/XBTFReader.h" diff --git a/tools/depends/native/TexturePacker/src/XBTFWriter.h b/tools/depends/native/TexturePacker/src/XBTFWriter.h index 7509303a51..d5cf1a2965 100644 --- a/tools/depends/native/TexturePacker/src/XBTFWriter.h +++ b/tools/depends/native/TexturePacker/src/XBTFWriter.h @@ -23,7 +23,7 @@ #include <vector> #include <string> -#include <stdio.h> +#include <cstdio> #include "guilib/XBTF.h" diff --git a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp index 56c22f7c3a..9ced4ec5bc 100644 --- a/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp +++ b/tools/depends/native/TexturePacker/src/decoder/GifHelper.cpp @@ -18,10 +18,10 @@ * */ -#include "GifHelper.h" #include <algorithm> -#include <stdlib.h> +#include <cstdlib> #include <cstring> +#include "GifHelper.h" #define UNSIGNED_LITTLE_ENDIAN(lo, hi) ((lo) | ((hi) << 8)) #define GIF_MAX_MEMORY 82944000U // about 79 MB, which is equivalent to 10 full hd frames. diff --git a/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp b/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp index 53f5e9beb7..b0f18bed68 100644 --- a/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp +++ b/tools/depends/native/TexturePacker/src/decoder/JPGDecoder.cpp @@ -72,7 +72,6 @@ bool JPGDecoder::LoadFile(const std::string &filename, DecodedFrames &frames) struct jpeg_decompress_struct cinfo; struct jpeg_error_mgr jerr; - char *linha; int ImageSize; cinfo.err = jpeg_std_error(&jerr); @@ -89,7 +88,6 @@ bool JPGDecoder::LoadFile(const std::string &filename, DecodedFrames &frames) DecodedFrame frame; frame.rgbaImage.pixels = (char *)new char[ImageSize]; - linha = (char *)frame.rgbaImage.pixels; unsigned char *scanlinebuff = new unsigned char[3 * cinfo.image_width]; unsigned char *dst = (unsigned char *)frame.rgbaImage.pixels; diff --git a/tools/depends/native/TexturePacker/src/md5.h b/tools/depends/native/TexturePacker/src/md5.h index 456e5be17f..4bb48e0810 100644 --- a/tools/depends/native/TexturePacker/src/md5.h +++ b/tools/depends/native/TexturePacker/src/md5.h @@ -23,8 +23,8 @@ #ifndef MD5_H #define MD5_H -#include <string.h> /* for memcpy() */ -#include <stdint.h> +#include <cstring> /* for memcpy() */ +#include <cstdint> struct MD5Context { |