Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2012-09-03 11:37:38 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-09-03 11:37:38 +0400
commitd248f94cf8b3a715297f3e512d0b10c7d7b7a0c1 (patch)
tree71275d90db69d9f434d69bc0422486dd35830fca /source/blender/imbuf/intern/thumbs_blend.c
parentca6fa937d498691faf77fa58f7c6c4128ac05866 (diff)
add endian switch functions to replace macros SWITCH_INT/LONG/SHORT, with BLI_endian_switch_int32/int64/float/double...
Diffstat (limited to 'source/blender/imbuf/intern/thumbs_blend.c')
-rw-r--r--source/blender/imbuf/intern/thumbs_blend.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source/blender/imbuf/intern/thumbs_blend.c b/source/blender/imbuf/intern/thumbs_blend.c
index afef2365de4..1a921c4844c 100644
--- a/source/blender/imbuf/intern/thumbs_blend.c
+++ b/source/blender/imbuf/intern/thumbs_blend.c
@@ -29,7 +29,10 @@
#include "zlib.h"
+#include "MEM_guardedalloc.h"
+
#include "BLI_utildefines.h"
+#include "BLI_endian_switch.h"
#include "BLI_fileops.h"
#include "BKE_utildefines.h"
@@ -39,8 +42,6 @@
#include "IMB_imbuf.h"
#include "IMB_thumbs.h"
-#include "MEM_guardedalloc.h"
-
/* extracts the thumbnail from between the 'REND' and the 'GLOB'
* chunks of the header, don't use typical blend loader because its too slow */
@@ -78,7 +79,7 @@ static ImBuf *loadblend_thumb(gzFile gzfile)
while (gzread(gzfile, bhead, sizeof_bhead) == sizeof_bhead) {
if (endian_switch)
- SWITCH_INT(bhead[1]); /* length */
+ BLI_endian_switch_int32(&bhead[1]); /* length */
if (bhead[0] == REND) {
gzseek(gzfile, bhead[1], SEEK_CUR); /* skip to the next */
@@ -97,8 +98,8 @@ static ImBuf *loadblend_thumb(gzFile gzfile)
return NULL;
if (endian_switch) {
- SWITCH_INT(size[0]);
- SWITCH_INT(size[1]);
+ BLI_endian_switch_int32(&size[0]);
+ BLI_endian_switch_int32(&size[1]);
}
/* length */
bhead[1] -= sizeof(int) * 2;