summaryrefslogtreecommitdiffstats
path: root/qmake/cachekeys.h
diff options
context:
space:
mode:
authorminiak <milan.burda@gmail.com>2010-08-03 16:33:13 (GMT)
committerOlivier Goffart <olivier.goffart@nokia.com>2010-08-03 16:35:29 (GMT)
commit0d6a0f1371d899c4105bc4383550ca1cb6b132b2 (patch)
tree83863409fd5b67699257cfe50d18d94bb2b30cba /qmake/cachekeys.h
parent26f43dcc70a0bcc8aec96a0ca6f648c543b97b10 (diff)
downloadQt-0d6a0f1371d899c4105bc4383550ca1cb6b132b2.zip
Qt-0d6a0f1371d899c4105bc4383550ca1cb6b132b2.tar.gz
Qt-0d6a0f1371d899c4105bc4383550ca1cb6b132b2.tar.bz2
qmake: qmakeDeleteCacheClear() function can be template now
Merge-request: 756 Reviewed-by: Olivier Goffart <olivier.goffart@nokia.com>
Diffstat (limited to 'qmake/cachekeys.h')
-rw-r--r--qmake/cachekeys.h9
1 files changed, 3 insertions, 6 deletions
diff --git a/qmake/cachekeys.h b/qmake/cachekeys.h
index 63bd224..c5c1631 100644
--- a/qmake/cachekeys.h
+++ b/qmake/cachekeys.h
@@ -166,12 +166,9 @@ struct FileFixifyCacheKey
inline uint qHash(const FileFixifyCacheKey &f) { return f.hashCode(); }
// -------------------------------------------------------------------------------------------------
-// As MSVC 6.0 can't handle template functions that well, we need a separate function for each type
-inline void qmakeDeleteCacheClear_QMapStringInt(void *i) { delete reinterpret_cast<QMap<QString,int> *>(i); }
-inline void qmakeDeleteCacheClear_QStringList(void *i) { delete reinterpret_cast<QStringList *>(i); }
-inline void qmakeDeleteCacheClear_QHashFixStringCacheKeyQString(void *i) { delete reinterpret_cast<QHash<FixStringCacheKey, QString> *>(i); }
-inline void qmakeDeleteCacheClear_QHashFileInfoCacheKeyQFileInfo(void *i) { delete reinterpret_cast<QHash<FileInfoCacheKey, QFileInfo> *>(i); }
-inline void qmakeDeleteCacheClear_QHashFileFixifyCacheKeyQString(void *i) { delete reinterpret_cast<QHash<FileFixifyCacheKey, QString> *>(i); }
+template <typename T>
+inline void qmakeDeleteCacheClear(void *i) { delete reinterpret_cast<T*>(i); }
+
inline void qmakeFreeCacheClear(void *i) { free(i); }
typedef void (*qmakeCacheClearFunc)(void *);