diff options
Diffstat (limited to 'src/tools/tqgcache.cpp')
| -rw-r--r-- | src/tools/tqgcache.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/tools/tqgcache.cpp b/src/tools/tqgcache.cpp index 471b59f6c..450ce5270 100644 --- a/src/tools/tqgcache.cpp +++ b/src/tools/tqgcache.cpp @@ -248,7 +248,7 @@ inline TQCDict::~TQCDict() The maximum cost of the cache is given by \a maxCost and the size by \a size. The key type is \a kt which may be \c StringKey, \c AsciiKey, \c IntKey or \c PtrKey. The case-sensitivity of lookups is set with - \a caseSensitive. Keys are copied if \a copyKeys is TRUE. + \a caseSensitive. Keys are copied if \a copyKeys is true. */ TQGCache::TQGCache( int maxCost, uint size, KeyType kt, bool caseSensitive, @@ -257,9 +257,9 @@ TQGCache::TQGCache( int maxCost, uint size, KeyType kt, bool caseSensitive, keytype = kt; lruList = new TQCList; TQ_CHECK_PTR( lruList ); - lruList->setAutoDelete( TRUE ); + lruList->setAutoDelete( true ); copyk = ((keytype == AsciiKey) && copyKeys); - dict = new TQCDict( size, kt, caseSensitive, FALSE ); + dict = new TQCDict( size, kt, caseSensitive, false ); TQ_CHECK_PTR( dict ); mCost = maxCost; tCost = 0; @@ -359,7 +359,7 @@ void TQGCache::setMaxCost( int maxCost ) Inserts an item with data \a data into the cache using key \a key. The item has cost \a cost and priority \a priority. - \warning If this function returns FALSE, you must delete \a data + \warning If this function returns false, you must delete \a data yourself. Additionally, be very careful about using \a data after calling this function, as any other insertions into the cache, from anywhere in the application, or within TQt itself, could cause the @@ -375,7 +375,7 @@ bool TQGCache::insert_string( const TQString &key, TQPtrCollection::Item data, #if defined(QT_DEBUG) lruList->insertMisses++; #endif - return FALSE; + return false; } } #if defined(QT_DEBUG) @@ -393,7 +393,7 @@ bool TQGCache::insert_string( const TQString &key, TQPtrCollection::Item data, lruList->insert( 0, ci ); dict->insert_string( key, ci ); tCost += cost; - return TRUE; + return true; } bool TQGCache::insert_other( const char *key, TQPtrCollection::Item data, @@ -404,7 +404,7 @@ bool TQGCache::insert_other( const char *key, TQPtrCollection::Item data, #if defined(QT_DEBUG) lruList->insertMisses++; #endif - return FALSE; + return false; } } #if defined(QT_DEBUG) @@ -427,13 +427,13 @@ bool TQGCache::insert_other( const char *key, TQPtrCollection::Item data, else dict->insert_int( (long)key, ci ); tCost += cost; - return TRUE; + return true; } /*! - Removes the item with key \a key from the cache. Returns TRUE if the - item was removed; otherwise returns FALSE. + Removes the item with key \a key from the cache. Returns true if the + item was removed; otherwise returns false. */ bool TQGCache::remove_string( const TQString &key ) @@ -533,7 +533,7 @@ void TQGCache::clear() /*! - Finds an item for \a key in the cache and adds a reference if \a ref is TRUE. + Finds an item for \a key in the cache and adds a reference if \a ref is true. */ TQPtrCollection::Item TQGCache::find_string( const TQString &key, bool ref ) const @@ -556,7 +556,7 @@ TQPtrCollection::Item TQGCache::find_string( const TQString &key, bool ref ) con /*! - Finds an item for \a key in the cache and adds a reference if \a ref is TRUE. + Finds an item for \a key in the cache and adds a reference if \a ref is true. */ TQPtrCollection::Item TQGCache::find_other( const char *key, bool ref ) const @@ -586,7 +586,7 @@ TQPtrCollection::Item TQGCache::find_other( const char *key, bool ref ) const bool TQGCache::makeRoomFor( int cost, int priority ) { if ( cost > mCost ) // cannot make room for more - return FALSE; // than maximum cost + return false; // than maximum cost if ( priority == -1 ) priority = 32767; TQCacheItem *ci = lruList->last(); @@ -598,7 +598,7 @@ bool TQGCache::makeRoomFor( int cost, int priority ) dumps++; } if ( cntCost < cost ) // can enough cost be dumped? - return FALSE; // no + return false; // no #if defined(QT_DEBUG) Q_ASSERT( dumps > 0 ); #endif @@ -628,7 +628,7 @@ bool TQGCache::makeRoomFor( int cost, int priority ) lruList->removeLast(); // remove from list } tCost -= cntCost; - return TRUE; + return true; } @@ -738,7 +738,7 @@ uint TQGCacheIterator::count() const } /*! - Returns TRUE if the iterator points to the first item. + Returns true if the iterator points to the first item. */ bool TQGCacheIterator::atFirst() const @@ -747,7 +747,7 @@ bool TQGCacheIterator::atFirst() const } /*! - Returns TRUE if the iterator points to the last item. + Returns true if the iterator points to the last item. */ bool TQGCacheIterator::atLast() const |
