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/tqgarray.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/tqgarray.cpp')
| -rw-r--r-- | src/tools/tqgarray.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tools/tqgarray.cpp b/src/tools/tqgarray.cpp index a3e9dc42f..6a5528ddf 100644 --- a/src/tools/tqgarray.cpp +++ b/src/tools/tqgarray.cpp @@ -211,16 +211,16 @@ TQGArray::~TQGArray() /*! - Returns TRUE if this array is equal to \a a, otherwise FALSE. + Returns true if this array is equal to \a a, otherwise false. The comparison is bitwise, of course. */ bool TQGArray::isEqual( const TQGArray &a ) const { if ( size() != a.size() ) // different size - return FALSE; + return false; if ( data() == a.data() ) // has same data - return TRUE; + return true; return (size() ? memcmp( data(), a.data(), size() ) : 0) == 0; } @@ -244,7 +244,7 @@ bool TQGArray::resize( uint newsize, Optimization optim ) && newsize == shd->maxl #endif ) // nothing to do - return TRUE; + return true; if ( newsize == 0 ) { // remove array if ( shd->data ) DELETE(shd->data); @@ -253,7 +253,7 @@ bool TQGArray::resize( uint newsize, Optimization optim ) #ifdef QT_QGARRAY_SPEED_OPTIM shd->maxl = 0; #endif - return TRUE; + return true; } uint newmaxl = newsize; @@ -262,7 +262,7 @@ bool TQGArray::resize( uint newsize, Optimization optim ) if ( newsize <= shd->maxl && ( newsize * 4 > shd->maxl || shd->maxl <= 4 ) ) { shd->len = newsize; - return TRUE; + return true; } newmaxl = 4; while ( newmaxl < newsize ) @@ -287,9 +287,9 @@ bool TQGArray::resize( uint newsize, Optimization optim ) shd->data = NEW(char,newmaxl); } if ( !shd->data ) // no memory - return FALSE; + return false; shd->len = newsize; - return TRUE; + return true; } /*!\overload @@ -306,7 +306,7 @@ bool TQGArray::resize( uint newsize ) If \a len is specified as different from -1, then the array will be resized to \a len*sz before it is filled. - Returns TRUE if successful, or FALSE if the memory cannot be allocated + Returns true if successful, or false if the memory cannot be allocated (only when \a len != -1). \sa resize() @@ -317,7 +317,7 @@ bool TQGArray::fill( const char *d, int len, uint sz ) if ( len < 0 ) len = shd->len/sz; // default: use array length else if ( !resize( len*sz ) ) - return FALSE; + return false; if ( sz == 1 ) // 8 bit elements memset( data(), *d, len ); else if ( sz == 4 ) { // 32 bit elements @@ -337,7 +337,7 @@ bool TQGArray::fill( const char *d, int len, uint sz ) x += sz; } } - return TRUE; + return true; } /*! @@ -774,7 +774,7 @@ int TQGArray::bsearch( const char *d, uint sz ) const Expand the array if necessary, and copies (the first part of) its contents from the \a index * \a sz bytes at \a d. - Returns TRUE if the operation succeeds, FALSE if it runs out of + Returns true if the operation succeeds, false if it runs out of memory. \warning This function disregards the reference count mechanism. If @@ -786,10 +786,10 @@ bool TQGArray::setExpand( uint index, const char *d, uint sz ) index *= sz; if ( index >= shd->len ) { if ( !resize( index+sz ) ) // no memory - return FALSE; + return false; } memcpy( data() + index, d, sz ); - return TRUE; + return true; } |
