diff options
author | Tomaz Canabrava <tcanabrava@kde.org> | 2013-12-24 10:18:56 -0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2013-12-24 07:24:11 -0800 |
commit | 1a933e7e19ba3ded1ab508dfb7ef4f19a1da4519 (patch) | |
tree | 7725eef30270b458cc6ad39f058a8356a06629df /qt-ui/diveplanner.h | |
parent | 5e446fd258e8ee200f2b8b19e86374add17b8287 (diff) | |
download | subsurface-1a933e7e19ba3ded1ab508dfb7ef4f19a1da4519.tar.gz |
Don't use QList if sizeof(item) > void*.
QList is optimized for storing pointer-sized items, thus
a QVector is the better choice for everything else.
Signed-off-by: Tomaz Canabrava <tcanabrava@kde.org>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'qt-ui/diveplanner.h')
-rw-r--r-- | qt-ui/diveplanner.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/qt-ui/diveplanner.h b/qt-ui/diveplanner.h index a3c50919c..95dc31fb4 100644 --- a/qt-ui/diveplanner.h +++ b/qt-ui/diveplanner.h @@ -43,7 +43,7 @@ public: int size(); struct diveplan getDiveplan(); QStringList &getGasList(); - QList<QPair<int, int> > collectGases(dive *d); + QVector<QPair<int, int> > collectGases(dive *d); public slots: int addStop(int millimeters = 0, int seconds = 0, int o2 = 0, int he = 0, int ccpoint = 0 ); @@ -76,7 +76,7 @@ private: void deleteTemporaryPlan(struct divedatapoint *dp); QVector<sample> backupSamples; // For editing added dives. struct dive *stagingDive; - QList<QPair<int, int> > oldGases; + QVector<QPair<int, int> > oldGases; }; class Button : public QObject, public QGraphicsRectItem { |