diff options
Diffstat (limited to 'tqtinterface/qt4/src/tools/tqgdict.cpp')
-rw-r--r-- | tqtinterface/qt4/src/tools/tqgdict.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tqtinterface/qt4/src/tools/tqgdict.cpp b/tqtinterface/qt4/src/tools/tqgdict.cpp index c4c21d9..dc4d450 100644 --- a/tqtinterface/qt4/src/tools/tqgdict.cpp +++ b/tqtinterface/qt4/src/tools/tqgdict.cpp @@ -64,9 +64,9 @@ Normally, you do not have to reimplement any of these functions. */ -static const int op_tqfind = 0; +static const int op_find = 0; static const int op_insert = 1; -static const int op_tqreplace = 2; +static const int op_replace = 2; class TQGDItList : public TQPtrList<TQGDictIterator> @@ -324,7 +324,7 @@ TQGDict &TQGDict::operator=( const TQGDict &dict ) */ /*! - The do-it-all function; \a op is one of op_tqfind, op_insert, op_tqreplace. + The do-it-all function; \a op is one of op_find, op_insert, op_replace. The key is \a key and the item is \a d. */ @@ -333,7 +333,7 @@ TQPtrCollection::Item TQGDict::look_string( const TQString &key, TQPtrCollection { TQStringBucket *n = 0; int index = hashKeyString(key) % vlen; - if ( op == op_tqfind ) { // tqfind + if ( op == op_find ) { // find if ( cases ) { n = (TQStringBucket*)vec[index]; while( n != 0 ) { @@ -352,11 +352,11 @@ TQPtrCollection::Item TQGDict::look_string( const TQString &key, TQPtrCollection } return 0; // not found } - if ( op == op_tqreplace ) { // tqreplace + if ( op == op_replace ) { // replace if ( vec[index] != 0 ) // maybe something there remove_string( key ); } - // op_insert or op_tqreplace + // op_insert or op_replace n = new TQStringBucket(key,newItem(d),vec[index]); TQ_CHECK_PTR( n ); #if defined(TQT_CHECK_NULL) @@ -372,7 +372,7 @@ TQPtrCollection::Item TQGDict::look_ascii( const char *key, TQPtrCollection::Ite { TQAsciiBucket *n; int index = hashKeyAscii(key) % vlen; - if ( op == op_tqfind ) { // tqfind + if ( op == op_find ) { // find if ( cases ) { for ( n=(TQAsciiBucket*)vec[index]; n; n=(TQAsciiBucket*)n->getNext() ) { @@ -388,11 +388,11 @@ TQPtrCollection::Item TQGDict::look_ascii( const char *key, TQPtrCollection::Ite } return 0; // not found } - if ( op == op_tqreplace ) { // tqreplace + if ( op == op_replace ) { // replace if ( vec[index] != 0 ) // maybe something there remove_ascii( key ); } - // op_insert or op_tqreplace + // op_insert or op_replace n = new TQAsciiBucket(copyk ? qstrdup(key) : key,newItem(d),vec[index]); TQ_CHECK_PTR( n ); #if defined(TQT_CHECK_NULL) @@ -408,7 +408,7 @@ TQPtrCollection::Item TQGDict::look_int( long key, TQPtrCollection::Item d, int { TQIntBucket *n; int index = (int)((ulong)key % vlen); // simple hash - if ( op == op_tqfind ) { // tqfind + if ( op == op_find ) { // find for ( n=(TQIntBucket*)vec[index]; n; n=(TQIntBucket*)n->getNext() ) { if ( n->getKey() == key ) @@ -416,11 +416,11 @@ TQPtrCollection::Item TQGDict::look_int( long key, TQPtrCollection::Item d, int } return 0; // not found } - if ( op == op_tqreplace ) { // tqreplace + if ( op == op_replace ) { // replace if ( vec[index] != 0 ) // maybe something there remove_int( key ); } - // op_insert or op_tqreplace + // op_insert or op_replace n = new TQIntBucket(key,newItem(d),vec[index]); TQ_CHECK_PTR( n ); #if defined(TQT_CHECK_NULL) @@ -436,7 +436,7 @@ TQPtrCollection::Item TQGDict::look_ptr( void *key, TQPtrCollection::Item d, int { TQPtrBucket *n; int index = (int)((ulong)key % vlen); // simple hash - if ( op == op_tqfind ) { // tqfind + if ( op == op_find ) { // find for ( n=(TQPtrBucket*)vec[index]; n; n=(TQPtrBucket*)n->getNext() ) { if ( n->getKey() == key ) @@ -444,11 +444,11 @@ TQPtrCollection::Item TQGDict::look_ptr( void *key, TQPtrCollection::Item d, int } return 0; // not found } - if ( op == op_tqreplace ) { // tqreplace + if ( op == op_replace ) { // replace if ( vec[index] != 0 ) // maybe something there remove_ptr( key ); } - // op_insert or op_tqreplace + // op_insert or op_replace n = new TQPtrBucket(key,newItem(d),vec[index]); TQ_CHECK_PTR( n ); #if defined(TQT_CHECK_NULL) |