diff options
author | Denton Woods <denton.woods@gmail.com> | 2016-12-28 18:26:11 -0600 |
---|---|---|
committer | Denton Woods <denton.woods@gmail.com> | 2016-12-28 18:26:11 -0600 |
commit | ac1a6549b3f1a2a9f5d73ce5b49cbc60a10c0560 (patch) | |
tree | f4afb147ff838577a887d12d4a147f67afbed083 | |
parent | 3e2e3eaac80b9c0b8aab904d6ef5272bb198cf05 (diff) | |
download | devil-ac1a6549b3f1a2a9f5d73ce5b49cbc60a10c0560.tar.gz |
- More changes to compile properly under Linux with C++ source files
-rw-r--r-- | DevIL/src-IL/src/il_icon.cpp | 2 | ||||
-rw-r--r-- | DevIL/src-IL/src/il_jp2.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/DevIL/src-IL/src/il_icon.cpp b/DevIL/src-IL/src/il_icon.cpp index fd9475dc..1a9a802f 100644 --- a/DevIL/src-IL/src/il_icon.cpp +++ b/DevIL/src-IL/src/il_icon.cpp @@ -592,7 +592,7 @@ ILboolean ico_readpng_get_image(ICOIMAGE *Icon, ILdouble display_exponent) Icon->Head.Width = width; Icon->Head.Height = height; - Icon->Data = ialloc(width * height * Icon->Head.BitCount / 8); + Icon->Data = (ILubyte*)ialloc(width * height * Icon->Head.BitCount / 8); if (Icon->Data == NULL) { png_destroy_read_struct(&ico_png_ptr, &ico_info_ptr, NULL); diff --git a/DevIL/src-IL/src/il_jp2.cpp b/DevIL/src-IL/src/il_jp2.cpp index 3fd397ba..aa38c839 100644 --- a/DevIL/src-IL/src/il_jp2.cpp +++ b/DevIL/src-IL/src/il_jp2.cpp @@ -383,7 +383,7 @@ jas_stream_t *iJp2ReadStream() stream->ops_ = &jas_stream_devilops; /* Allocate memory for the underlying memory stream object. */ - if (!(obj = jas_malloc(sizeof(jas_stream_memobj_t)))) { + if (!(obj = (jas_stream_memobj_t*)jas_malloc(sizeof(jas_stream_memobj_t)))) { jas_stream_destroy(stream); return 0; } @@ -440,7 +440,7 @@ static void jas_stream_initbuf(jas_stream_t *stream, int bufmode ) if (bufmode != JAS_STREAM_UNBUF) { /* The full- or line-buffered mode is being employed. */ - if ((stream->bufbase_ = jas_malloc(JAS_STREAM_BUFSIZE + + if ((stream->bufbase_ = (unsigned char*)jas_malloc(JAS_STREAM_BUFSIZE + JAS_STREAM_MAXPUTBACK))) { stream->bufmode_ |= JAS_STREAM_FREEBUF; stream->bufsize_ = JAS_STREAM_BUFSIZE; @@ -466,7 +466,7 @@ static jas_stream_t *jas_stream_create() { jas_stream_t *stream; - if (!(stream = jas_malloc(sizeof(jas_stream_t)))) { + if (!(stream = (jas_stream_t*)jas_malloc(sizeof(jas_stream_t)))) { return 0; } stream->openmode_ = 0; @@ -519,7 +519,7 @@ jas_stream_t *iJp2WriteStream() stream->ops_ = &jas_stream_devilops; /* Allocate memory for the underlying memory stream object. */ - if (!(obj = jas_malloc(sizeof(jas_stream_memobj_t)))) { + if (!(obj = (jas_stream_memobj_t*)jas_malloc(sizeof(jas_stream_memobj_t)))) { jas_stream_destroy(stream); return 0; } |