diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-03-03 00:05:55 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-03-03 01:16:28 +0200 |
commit | 30313007a8bfc327f47d096f6d9e625f1193b14a (patch) | |
tree | 68a21cc01ec981a4bb1ba6a751e295272c07c6f6 /oox | |
parent | b43bdd47fe7b6fccb4ca490b5b3a91d71113cd66 (diff) |
WaE: use of logical '&&' with constant operand
Surely it's the bitwise operator & that is wanted here. The code makes
no sense otherwise. We apparently have been generating UUIDs where
every second hex digit is always a '1', like
{x1x1x1x1-x1x1-x1x1-x1x1-x1x1x1x1x1x1} (where each x is a random hex
digit).
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/drawingml.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/oox/source/export/drawingml.cxx b/oox/source/export/drawingml.cxx index 119d970d4ebb..b77318c9028b 100644 --- a/oox/source/export/drawingml.cxx +++ b/oox/source/export/drawingml.cxx @@ -906,27 +906,27 @@ void DrawingML::GetUUID( OStringBuffer& rBuffer ) rBuffer.append( '{' ); for( i = 0; i < 4; i++ ) { rBuffer.append( cDigits[ aSeq[i] >> 4 ] ); - rBuffer.append( cDigits[ aSeq[i] && 0xf ] ); + rBuffer.append( cDigits[ aSeq[i] & 0xf ] ); } rBuffer.append( '-' ); for( ; i < 6; i++ ) { rBuffer.append( cDigits[ aSeq[i] >> 4 ] ); - rBuffer.append( cDigits[ aSeq[i] && 0xf ] ); + rBuffer.append( cDigits[ aSeq[i] & 0xf ] ); } rBuffer.append( '-' ); for( ; i < 8; i++ ) { rBuffer.append( cDigits[ aSeq[i] >> 4 ] ); - rBuffer.append( cDigits[ aSeq[i] && 0xf ] ); + rBuffer.append( cDigits[ aSeq[i] & 0xf ] ); } rBuffer.append( '-' ); for( ; i < 10; i++ ) { rBuffer.append( cDigits[ aSeq[i] >> 4 ] ); - rBuffer.append( cDigits[ aSeq[i] && 0xf ] ); + rBuffer.append( cDigits[ aSeq[i] & 0xf ] ); } rBuffer.append( '-' ); for( ; i < 16; i++ ) { rBuffer.append( cDigits[ aSeq[i] >> 4 ] ); - rBuffer.append( cDigits[ aSeq[i] && 0xf ] ); + rBuffer.append( cDigits[ aSeq[i] & 0xf ] ); } rBuffer.append( '}' ); } |