From e01832763d9f941e7d99c734da98f6fddd9ab031 Mon Sep 17 00:00:00 2001 From: Robert Osfield Date: Fri, 5 Mar 2010 10:58:47 +0000 Subject: [PATCH] Fixed warning --- src/osgPlugins/txp/trpage_swap.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/osgPlugins/txp/trpage_swap.cpp b/src/osgPlugins/txp/trpage_swap.cpp index 59273ccae..48f1908db 100644 --- a/src/osgPlugins/txp/trpage_swap.cpp +++ b/src/osgPlugins/txp/trpage_swap.cpp @@ -16,13 +16,13 @@ #include #include #include +#include /* trpage_swap.h Byte swapping utility functions. */ #include - /* ** func: swap_two( in, out ) ** @@ -200,9 +200,7 @@ trpgllong trpg_byteswap_llong ( trpgllong number ) TX_CPPDECL trpgEndian trpg_cpu_byte_order(void) { - static char big_endian_100[2] = { 0, 100 }; - - if ( (*((short*) big_endian_100)) == 100 ) + if (osg::getCpuByteOrder()==osg::BigEndian) return BigEndian; else return LittleEndian;