From d248f94cf8b3a715297f3e512d0b10c7d7b7a0c1 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 3 Sep 2012 07:37:38 +0000 Subject: add endian switch functions to replace macros SWITCH_INT/LONG/SHORT, with BLI_endian_switch_int32/int64/float/double... --- source/blender/imbuf/intern/indexer.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'source/blender/imbuf/intern/indexer.c') diff --git a/source/blender/imbuf/intern/indexer.c b/source/blender/imbuf/intern/indexer.c index 4108f0d89d7..702e9872a91 100644 --- a/source/blender/imbuf/intern/indexer.c +++ b/source/blender/imbuf/intern/indexer.c @@ -31,6 +31,7 @@ #include "MEM_guardedalloc.h" #include "BLI_utildefines.h" +#include "BLI_endian_switch.h" #include "BLI_string.h" #include "BLI_path_util.h" #include "BLI_fileops.h" @@ -208,10 +209,10 @@ struct anim_index *IMB_indexer_open(const char *name) if (((ENDIAN_ORDER == B_ENDIAN) != (header[8] == 'V'))) { for (i = 0; i < idx->num_entries; i++) { - SWITCH_INT(idx->entries[i].frameno); - SWITCH_INT64(idx->entries[i].seek_pos); - SWITCH_INT64(idx->entries[i].seek_pos_dts); - SWITCH_INT64(idx->entries[i].pts); + BLI_endian_switch_int32(&idx->entries[i].frameno); + BLI_endian_switch_int64((int64_t *)&idx->entries[i].seek_pos); + BLI_endian_switch_int64((int64_t *)&idx->entries[i].seek_pos_dts); + BLI_endian_switch_int64((int64_t *)&idx->entries[i].pts); } } -- cgit v1.2.3