summaryrefslogtreecommitdiff
path: root/canvas/inc/canvas/canvastools.hxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-06-15 09:25:15 +0000
committerOliver Bolte <obo@openoffice.org>2005-06-15 09:25:15 +0000
commit62f153403591bf6decc0ae919350e5d57f83a05d (patch)
tree665f33fff38f648a395ab4f92abf6df0d8cfdba5 /canvas/inc/canvas/canvastools.hxx
parent411add2e902bb552d7647a71cf6dee5f50f2bb0d (diff)
INTEGRATION: CWS buildfixes01 (1.8.6); FILE MERGED
2005/05/25 16:56:41 thb 1.8.6.1: #i49681# Fixed build breakage for FreeBSD (powerof2 already defined)
Diffstat (limited to 'canvas/inc/canvas/canvastools.hxx')
-rw-r--r--canvas/inc/canvas/canvastools.hxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/canvas/inc/canvas/canvastools.hxx b/canvas/inc/canvas/canvastools.hxx
index 29c2e9c317ee..ffdf051fde09 100644
--- a/canvas/inc/canvas/canvastools.hxx
+++ b/canvas/inc/canvas/canvastools.hxx
@@ -2,9 +2,9 @@
*
* $RCSfile: canvastools.hxx,v $
*
- * $Revision: 1.8 $
+ * $Revision: 1.9 $
*
- * last change: $Author: obo $ $Date: 2005-04-18 09:07:23 $
+ * last change: $Author: obo $ $Date: 2005-06-15 10:25:15 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -133,9 +133,9 @@ namespace canvas
*/
// mickey's math tricks...
- inline unsigned int powerof2( unsigned int c ) { return 0x1 << c; }
- inline unsigned int mask( unsigned int c ) { return ((unsigned int)(-1)) / (powerof2(powerof2(c)) + 1); }
- inline unsigned int count( unsigned int x, unsigned int c ) { return ((x) & mask(c)) + (((x) >> (powerof2(c))) & mask(c)); }
+ inline unsigned int pow2( unsigned int c ) { return 0x1 << c; }
+ inline unsigned int mask( unsigned int c ) { return ((unsigned int)(-1)) / (pow2(pow2(c)) + 1); }
+ inline unsigned int count( unsigned int x, unsigned int c ) { return ((x) & mask(c)) + (((x) >> (pow2(c))) & mask(c)); }
template<typename T>
inline unsigned int bitcount( T c ) {
unsigned int nByteIndex = 0;