diff options
author | Kurt Zenker <kz@openoffice.org> | 2006-07-19 16:13:43 +0000 |
---|---|---|
committer | Kurt Zenker <kz@openoffice.org> | 2006-07-19 16:13:43 +0000 |
commit | 2adea1f311fbfd88e0fcf1686c7e9d1fad5ae82f (patch) | |
tree | ae5c9c708e44aa5bd5dfb8d12a3bd2a2b2204e9d | |
parent | 5e3cc0a5965458f0c416ce4ab69c53caf893bd26 (diff) |
INTEGRATION: CWS warningfixes02 (1.9.4); FILE MERGED
2006/06/30 12:30:51 sb 1.9.4.1: #i66577# Made the code compile (warning-free) on a unxlngi6.pro GCC 4.1.1 Linux box.
-rw-r--r-- | goodies/source/filter.vcl/itiff/itiff.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/goodies/source/filter.vcl/itiff/itiff.cxx b/goodies/source/filter.vcl/itiff/itiff.cxx index 5963cb3e67c4..17b22aed3c2b 100644 --- a/goodies/source/filter.vcl/itiff/itiff.cxx +++ b/goodies/source/filter.vcl/itiff/itiff.cxx @@ -4,9 +4,9 @@ * * $RCSfile: itiff.cxx,v $ * - * $Revision: 1.9 $ + * $Revision: 1.10 $ * - * last change: $Author: hr $ $Date: 2006-06-19 21:49:04 $ + * last change: $Author: kz $ $Date: 2006-07-19 17:13:43 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -50,9 +50,16 @@ #define OOODEBUG(str,Num) //(InfoBox(NULL,String(str)+String(" ")+String(Num)).Execute(); -#define BYTESWAP( nByte ) ( nByte << 7 ) | ( ( nByte & 2 ) << 5 ) | ( ( nByte & 4 ) << 3 ) | ( ( nByte & 8 ) << 1 ) | \ - ( ( nByte & 16 ) >> 1 ) | ( ( nByte & 32 ) >> 3 ) | ( ( nByte & 64 ) >> 5 ) | ( ( nByte & 128 ) >> 7 ) +namespace { +template< typename T > T BYTESWAP(T nByte) { + return ( nByte << 7 ) | ( ( nByte & 2 ) << 5 ) | ( ( nByte & 4 ) << 3 ) | + ( ( nByte & 8 ) << 1 ) | ( ( nByte & 16 ) >> 1 ) | + ( ( nByte & 32 ) >> 3 ) | ( ( nByte & 64 ) >> 5 ) | + ( ( nByte & 128 ) >> 7 ); +} + +} //============================ TIFFReader ================================== |