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).
This commit is contained in:
parent
b43bdd47fe
commit
30313007a8
1 changed files with 5 additions and 5 deletions
|
@ -906,27 +906,27 @@ void DrawingML::GetUUID( OStringBuffer& rBuffer )
|
||||||
rBuffer.append( '{' );
|
rBuffer.append( '{' );
|
||||||
for( i = 0; i < 4; i++ ) {
|
for( i = 0; i < 4; i++ ) {
|
||||||
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
||||||
rBuffer.append( cDigits[ aSeq[i] && 0xf ] );
|
rBuffer.append( cDigits[ aSeq[i] & 0xf ] );
|
||||||
}
|
}
|
||||||
rBuffer.append( '-' );
|
rBuffer.append( '-' );
|
||||||
for( ; i < 6; i++ ) {
|
for( ; i < 6; i++ ) {
|
||||||
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
||||||
rBuffer.append( cDigits[ aSeq[i] && 0xf ] );
|
rBuffer.append( cDigits[ aSeq[i] & 0xf ] );
|
||||||
}
|
}
|
||||||
rBuffer.append( '-' );
|
rBuffer.append( '-' );
|
||||||
for( ; i < 8; i++ ) {
|
for( ; i < 8; i++ ) {
|
||||||
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
||||||
rBuffer.append( cDigits[ aSeq[i] && 0xf ] );
|
rBuffer.append( cDigits[ aSeq[i] & 0xf ] );
|
||||||
}
|
}
|
||||||
rBuffer.append( '-' );
|
rBuffer.append( '-' );
|
||||||
for( ; i < 10; i++ ) {
|
for( ; i < 10; i++ ) {
|
||||||
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
||||||
rBuffer.append( cDigits[ aSeq[i] && 0xf ] );
|
rBuffer.append( cDigits[ aSeq[i] & 0xf ] );
|
||||||
}
|
}
|
||||||
rBuffer.append( '-' );
|
rBuffer.append( '-' );
|
||||||
for( ; i < 16; i++ ) {
|
for( ; i < 16; i++ ) {
|
||||||
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
rBuffer.append( cDigits[ aSeq[i] >> 4 ] );
|
||||||
rBuffer.append( cDigits[ aSeq[i] && 0xf ] );
|
rBuffer.append( cDigits[ aSeq[i] & 0xf ] );
|
||||||
}
|
}
|
||||||
rBuffer.append( '}' );
|
rBuffer.append( '}' );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue