PlayHandle: use QList instead of QVector for PlayHandle array

Use QList instead of QVector when using a set of PlayHandle's. QList
has faster insert/remove operations and in most cases we iterate through
the array using iterators so there's no performance drop.

Signed-off-by: Tobias Doerffel <tobias.doerffel@gmail.com>
(cherry picked from commit 2cc49b8010)
This commit is contained in:
Tobias Doerffel
2009-06-15 15:04:55 +02:00
parent cafb24fe9a
commit 0faaab4521
5 changed files with 26 additions and 26 deletions

View File

@@ -234,7 +234,7 @@ public:
void removePlayHandle( playHandle * _ph );
inline playHandleVector & playHandles( void )
inline PlayHandleList & playHandles( void )
{
return m_playHandles;
}
@@ -443,8 +443,8 @@ private:
QWaitCondition m_queueReadyWaitCond;
playHandleVector m_playHandles;
constPlayHandleVector m_playHandlesToRemove;
PlayHandleList m_playHandles;
ConstPlayHandleList m_playHandlesToRemove;
struct qualitySettings m_qualitySettings;
float m_masterGain;

View File

@@ -1,8 +1,8 @@
/*
* play_handle.h - base-class playHandle - core of rendering engine
*
* Copyright (c) 2004-2008 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* Copyright (c) 2004-2009 Tobias Doerffel <tobydox/at/users.sourceforge.net>
*
* This file is part of Linux MultiMedia Studio - http://lmms.sourceforge.net
*
* This program is free software; you can redistribute it and/or
@@ -22,7 +22,6 @@
*
*/
#ifndef _PLAY_HANDLE_H
#define _PLAY_HANDLE_H
@@ -98,8 +97,8 @@ private:
} ;
typedef QVector<playHandle *> playHandleVector;
typedef QVector<const playHandle *> constPlayHandleVector;
typedef QList<playHandle *> PlayHandleList;
typedef QList<const playHandle *> ConstPlayHandleList;
#endif