From 2f43a79e4e87341dd0df49fc6c11fd17a21350c2 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Tue, 20 Jun 2006 11:28:23 -0700 Subject: [PATCH] ft-font: Use compile-time test (WORDS_BIGENDIAN) rather than run-time function to test endian-ness. --- src/cairo-ft-font.c | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/src/cairo-ft-font.c b/src/cairo-ft-font.c index 9a30cc85d..9db46d29e 100644 --- a/src/cairo-ft-font.c +++ b/src/cairo-ft-font.c @@ -698,14 +698,6 @@ static const int filters[3][3] = { { 65538*1/13,65538*3/13,65538*9/13 }, }; -static cairo_bool_t -_native_byte_order_lsb (void) -{ - int x = 1; - - return *((char *) &x) == 1; -} - /* Fills in val->image with an image surface created from @bitmap */ static cairo_status_t @@ -751,7 +743,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap, } } - if (_native_byte_order_lsb()) +#ifndef WORDS_BIGENDIAN { unsigned char *d = data; int count = stride * height; @@ -761,6 +753,7 @@ _get_bitmap_surface (FT_Bitmap *bitmap, *d++; } } +#endif format = CAIRO_FORMAT_A1; break;