diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-22 12:05:18 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-12-22 12:13:05 +0900 |
| commit | a4ebd73f48610ed351c9c53f3646d0597f8ea7bc (patch) | |
| tree | 2edd219eef4cb8f35bb3844d06902ae8b2fcb565 /src/tools/tqbitarray.cpp | |
| parent | 7d612f7c91d55501276a385a30dbadb121e7bd9f (diff) | |
| download | tqt-rename/true-false-9.tar.gz tqt-rename/true-false-9.zip | |
Replace TRUE/FALSE with boolean values true/false - part 9rename/true-false-9
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
Diffstat (limited to 'src/tools/tqbitarray.cpp')
| -rw-r--r-- | src/tools/tqbitarray.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tools/tqbitarray.cpp b/src/tools/tqbitarray.cpp index 5eb33b92b..9f8298253 100644 --- a/src/tools/tqbitarray.cpp +++ b/src/tools/tqbitarray.cpp @@ -199,8 +199,8 @@ void TQBitArray::pad0() */ /*! - Resizes the bit array to \a size bits and returns TRUE if the bit - array could be resized; otherwise returns FALSE. The array becomes + Resizes the bit array to \a size bits and returns true if the bit + array could be resized; otherwise returns false. The array becomes a null array if \a size == 0. If the array is expanded, the new bits are set to 0. @@ -212,26 +212,26 @@ bool TQBitArray::resize( uint size ) { uint s = this->size(); if ( !TQByteArray::resize( (size+7)/8 ) ) - return FALSE; // cannot resize + return false; // cannot resize SHBLOCK->nbits = size; if ( size != 0 ) { // not null array int ds = (int)(size+7)/8 - (int)(s+7)/8;// number of bytes difference if ( ds > 0 ) // expanding array memset( data() + (s+7)/8, 0, ds ); // reset new data } - return TRUE; + return true; } /*! - Fills the bit array with \a v (1's if \a v is TRUE, or 0's if \a v - is FALSE). + Fills the bit array with \a v (1's if \a v is true, or 0's if \a v + is false). fill() resizes the bit array to \a size bits if \a size is nonnegative. - Returns FALSE if a nonnegative \e size was specified and the bit - array could not be resized; otherwise returns TRUE. + Returns false if a nonnegative \e size was specified and the bit + array could not be resized; otherwise returns true. \sa resize() */ @@ -240,7 +240,7 @@ bool TQBitArray::fill( bool v, int size ) { if ( size >= 0 ) { // resize first if ( !resize( size ) ) - return FALSE; // cannot resize + return false; // cannot resize } else { size = this->size(); } @@ -248,7 +248,7 @@ bool TQBitArray::fill( bool v, int size ) memset( data(), v ? 0xff : 0, (size + 7) / 8 ); if ( v ) pad0(); - return TRUE; + return true; } @@ -286,8 +286,8 @@ TQBitArray TQBitArray::copy() const /*! - Returns TRUE if the bit at position \a index is set, i.e. is 1; - otherwise returns FALSE. + Returns true if the bit at position \a index is set, i.e. is 1; + otherwise returns false. \sa setBit(), clearBit() */ @@ -297,7 +297,7 @@ bool TQBitArray::testBit( uint index ) const #if defined(QT_CHECK_RANGE) if ( index >= size() ) { tqWarning( "TQBitArray::testBit: Index %d out of range", index ); - return FALSE; + return false; } #endif return (*(data()+(index>>3)) & (1 << (index & 7))) != 0; @@ -369,7 +369,7 @@ bool TQBitArray::toggleBit( uint index ) #if defined(QT_CHECK_RANGE) if ( index >= size() ) { tqWarning( "TQBitArray::toggleBit: Index %d out of range", index ); - return FALSE; + return false; } #endif uchar *p = (uchar *)data() + (index>>3); |
