summaryrefslogtreecommitdiff
path: root/src/lib/eet
diff options
context:
space:
mode:
authorCedric BAIL <cedric.bail@samsung.com>2014-01-03 16:20:53 +0900
committerCedric BAIL <cedric@osg.samsung.com>2015-01-06 11:48:25 +0100
commit18d494489c5651aa152622a56579bbc1bda853cb (patch)
tree2df0149d6d32541e0dc26936b43ba17b821f536c /src/lib/eet
parenta90876c337422d2da918152b048a0dc0965295d5 (diff)
downloadefl-18d494489c5651aa152622a56579bbc1bda853cb.tar.gz
eet: use eina_swap*() function instead of custom slower one.
Diffstat (limited to 'src/lib/eet')
-rw-r--r--src/lib/eet/eet_image.c20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/lib/eet/eet_image.c b/src/lib/eet/eet_image.c
index bdac8f8d94..6a0bfa7b79 100644
--- a/src/lib/eet/eet_image.c
+++ b/src/lib/eet/eet_image.c
@@ -318,23 +318,9 @@ static int _eet_image_words_bigendian = -1;
/*---*/
-#define SWAP64(x) (x) = \
- ((((unsigned long long)(x) & 0x00000000000000ffULL) << 56) | \
- (((unsigned long long)(x) & 0x000000000000ff00ULL) << 40) | \
- (((unsigned long long)(x) & 0x0000000000ff0000ULL) << 24) | \
- (((unsigned long long)(x) & 0x00000000ff000000ULL) << 8) | \
- (((unsigned long long)(x) & 0x000000ff00000000ULL) >> 8) | \
- (((unsigned long long)(x) & 0x0000ff0000000000ULL) >> 24) | \
- (((unsigned long long)(x) & 0x00ff000000000000ULL) >> 40) | \
- (((unsigned long long)(x) & 0xff00000000000000ULL) >> 56))
-#define SWAP32(x) (x) = \
- ((((int)(x) & 0x000000ff) << 24) | \
- (((int)(x) & 0x0000ff00) << 8) | \
- (((int)(x) & 0x00ff0000) >> 8) | \
- (((int)(x) & 0xff000000) >> 24))
-#define SWAP16(x) (x) = \
- ((((short)(x) & 0x00ff) << 8) | \
- (((short)(x) & 0xff00) >> 8))
+#define SWAP64(x) eina_swap64(x)
+#define SWAP32(x) eina_swap32(x)
+#define SWAP16(x) eina_swap16(x)
#ifdef CONV8
# undef CONV8