summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorMathias Hasselmann <mathias.hasselmann@kdab.com>2013-07-04 13:27:15 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-09-08 16:13:16 +0200
commit50e2db6a752b5d8b3af3023ff4cebb13ef2b9a2a (patch)
tree7c20be51f02606d8c9e2269a3d37da1bea6d49cc /src/opengl
parent69e21f1a86c201b817611d0bb237999e809cde0f (diff)
Add first/last accessors to QMap
QMap explicitly sorts its entries by key value. For an ordered container it's (often?) useful to access the first or last entry, for instance to quickly compute the next key of the mapping. The first entry is easily accessible by the STL begin() method, but for accessing the last entry pretty ugly iterator arithmetics must be applied: *(end() - 1). With their first() and last() accessors the container classes QList and QVector provide a much nicer method of accessing extrema, so for consistency this syntactical sugar also should be applied to QMap. Change-Id: Ibd544acbad8c3ac16f12a1e74362207ea1694375 Reviewed-by: Thiago Macieira <thiago.macieira@intel.com> Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Diffstat (limited to 'src/opengl')
0 files changed, 0 insertions, 0 deletions