diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-12-01 14:58:58 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-12-02 14:50:48 (GMT) |
commit | ae0c72025c78e4fa4f8aa793e3b83f245a7837a7 (patch) | |
tree | 7c8a5c7d2541ef47fd6abaabe42c3ba9c5625cde /src/gui/painting/qdatabuffer_p.h | |
parent | 1d037c582e2a832b55614641af912517d17e7604 (diff) | |
download | Qt-ae0c72025c78e4fa4f8aa793e3b83f245a7837a7.zip Qt-ae0c72025c78e4fa4f8aa793e3b83f245a7837a7.tar.gz Qt-ae0c72025c78e4fa4f8aa793e3b83f245a7837a7.tar.bz2 |
Added QTriangulator.
Task-number: QT-2594
Diffstat (limited to 'src/gui/painting/qdatabuffer_p.h')
-rw-r--r-- | src/gui/painting/qdatabuffer_p.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/gui/painting/qdatabuffer_p.h b/src/gui/painting/qdatabuffer_p.h index efe238e..41203ed 100644 --- a/src/gui/painting/qdatabuffer_p.h +++ b/src/gui/painting/qdatabuffer_p.h @@ -81,7 +81,9 @@ public: inline Type &at(int i) { Q_ASSERT(i >= 0 && i < siz); return buffer[i]; } inline const Type &at(int i) const { Q_ASSERT(i >= 0 && i < siz); return buffer[i]; } + inline Type &last() { Q_ASSERT(!isEmpty()); return buffer[siz-1]; } inline const Type &last() const { Q_ASSERT(!isEmpty()); return buffer[siz-1]; } + inline Type &first() { Q_ASSERT(!isEmpty()); return buffer[0]; } inline const Type &first() const { Q_ASSERT(!isEmpty()); return buffer[0]; } inline void add(const Type &t) { @@ -90,6 +92,11 @@ public: ++siz; } + inline void pop_back() { + Q_ASSERT(siz > 0); + --siz; + } + inline void resize(int size) { reserve(size); siz = size; |