summaryrefslogtreecommitdiffstats
path: root/src/core
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2017-09-06 13:17:54 +0200
committerSean Harmer <sean.harmer@kdab.com>2017-09-11 11:06:37 +0000
commitcd467d5ffc6eaaa7da089ab4acc5284cd11d1109 (patch)
treed53d51e6dabe60d4e16c77a8fadbcfa25cf87ad7 /src/core
parent837a56fa10b26f129cb0a70caaff9f84e00a3acb (diff)
Get rid of the AllocationPolicy template argument in the ResourceManager
We always use the same policy anyway. Change-Id: I3349b8c19ce0e6239b140dfac7ba66f8dda1b9be Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/core')
-rw-r--r--src/core/resources/qresourcemanager_p.h16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/core/resources/qresourcemanager_p.h b/src/core/resources/qresourcemanager_p.h
index 85233c97f..4cb2a38af 100644
--- a/src/core/resources/qresourcemanager_p.h
+++ b/src/core/resources/qresourcemanager_p.h
@@ -346,28 +346,25 @@ private:
#ifndef QT_NO_DEBUG_STREAM
template <typename ValueType, typename KeyType, uint INDEXBITS,
- template <typename, uint> class AllocatingPolicy,
template <class> class LockingPolicy
>
class QResourceManager;
template <typename ValueType, typename KeyType, uint INDEXBITS = 16,
- template <typename, uint> class AllocatingPolicy = ArrayAllocatingPolicy,
template <class> class LockingPolicy = NonLockingPolicy
>
-QDebug operator<<(QDebug dbg, const QResourceManager<ValueType, KeyType, INDEXBITS, AllocatingPolicy, LockingPolicy> &manager);
+QDebug operator<<(QDebug dbg, const QResourceManager<ValueType, KeyType, INDEXBITS, LockingPolicy> &manager);
#endif
template <typename ValueType, typename KeyType, uint INDEXBITS = 16,
- template <typename, uint> class AllocatingPolicy = ArrayAllocatingPolicy,
template <class> class LockingPolicy = NonLockingPolicy
>
class QResourceManager
- : public AllocatingPolicy<ValueType, INDEXBITS>
- , public LockingPolicy< QResourceManager<ValueType, KeyType, INDEXBITS, AllocatingPolicy, LockingPolicy> >
+ : public ArrayAllocatingPolicy<ValueType, INDEXBITS>
+ , public LockingPolicy< QResourceManager<ValueType, KeyType, INDEXBITS, LockingPolicy> >
{
public:
- typedef AllocatingPolicy<ValueType, INDEXBITS> Allocator;
+ typedef ArrayAllocatingPolicy<ValueType, INDEXBITS> Allocator;
typedef QHandle<ValueType, INDEXBITS> Handle;
QResourceManager() :
@@ -474,15 +471,14 @@ private:
Allocator::releaseResource(handle);
}
- friend QDebug operator<< <>(QDebug dbg, const QResourceManager<ValueType, KeyType, INDEXBITS, AllocatingPolicy, LockingPolicy> &manager);
+ friend QDebug operator<< <>(QDebug dbg, const QResourceManager<ValueType, KeyType, INDEXBITS, LockingPolicy> &manager);
};
#ifndef QT_NO_DEBUG_STREAM
template <typename ValueType, typename KeyType, uint INDEXBITS,
- template <typename, uint> class AllocatingPolicy,
template <class> class LockingPolicy
>
-QDebug operator<<(QDebug dbg, const QResourceManager<ValueType, KeyType, INDEXBITS, AllocatingPolicy, LockingPolicy> &manager)
+QDebug operator<<(QDebug dbg, const QResourceManager<ValueType, KeyType, INDEXBITS, LockingPolicy> &manager)
{
QDebugStateSaver saver(dbg);
dbg << "Contains" << manager.count() << "items" << "of a maximum" << manager.maximumSize() << endl;