diff options
author | Dimitri van Heesch <dimitri@stack.nl> | 2013-01-20 13:31:30 (GMT) |
---|---|---|
committer | Dimitri van Heesch <dimitri@stack.nl> | 2013-01-20 13:31:30 (GMT) |
commit | dcd4714c4413348d02eb7224dafee5d06be43dfb (patch) | |
tree | 3872f0367bbee22883a702d1d2f799c9a9c2e8ac /qtools/qgcache.cpp | |
parent | 775ab3be95c02dd805aadc73ffbe3c18877c12a4 (diff) | |
download | Doxygen-dcd4714c4413348d02eb7224dafee5d06be43dfb.zip Doxygen-dcd4714c4413348d02eb7224dafee5d06be43dfb.tar.gz Doxygen-dcd4714c4413348d02eb7224dafee5d06be43dfb.tar.bz2 |
Release-1.8.3.1
Diffstat (limited to 'qtools/qgcache.cpp')
-rw-r--r-- | qtools/qgcache.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/qtools/qgcache.cpp b/qtools/qgcache.cpp index e5dd8de..511c867 100644 --- a/qtools/qgcache.cpp +++ b/qtools/qgcache.cpp @@ -216,7 +216,7 @@ public: bool remove_ascii( QCacheItem *item ) { return QGDict::remove_ascii((const char *)item->key,item); } bool remove_int( QCacheItem *item ) - { return QGDict::remove_int((long)item->key,item);} + { return QGDict::remove_int((intptr_t)item->key,item);} void statistics() { QGDict::statistics(); } }; @@ -406,7 +406,7 @@ bool QGCache::insert_other( const char *key, QCollection::Item data, if ( keytype == AsciiKey ) dict->insert_ascii( key, ci ); else - dict->insert_int( (long)key, ci ); + dict->insert_int( (intptr_t)key, ci ); tCost += cost; return TRUE; } @@ -469,7 +469,7 @@ QCollection::Item QGCache::take_other( const char *key ) if ( keytype == AsciiKey ) ci = dict->take_ascii( key ); else - ci = dict->take_int( (long)key ); + ci = dict->take_int( (intptr_t)key ); Item d; if ( ci ) { d = ci->data; @@ -549,7 +549,7 @@ QCollection::Item QGCache::find_string( const QString &key, bool ref ) const QCollection::Item QGCache::find_other( const char *key, bool ref ) const { QCacheItem *ci = keytype == AsciiKey ? dict->find_ascii(key) - : dict->find_int((long)key); + : dict->find_int((intptr_t)key); #if defined(DEBUG) lruList->finds++; #endif @@ -816,10 +816,10 @@ const char *QGCacheIterator::getKeyAscii() const Returns the key of the current item, as a long. */ -long QGCacheIterator::getKeyInt() const +intptr_t QGCacheIterator::getKeyInt() const { QCacheItem *item = it->current(); - return item ? (long)item->key : 0; + return item ? (intptr_t)item->key : 0; } /*! |