diff options
author | Sebastian Geerken <devnull@localhost> | 2014-06-06 22:40:49 +0200 |
---|---|---|
committer | Sebastian Geerken <devnull@localhost> | 2014-06-06 22:40:49 +0200 |
commit | 1480c8a1556ec5115b7dbf0f3253c6a61033ad55 (patch) | |
tree | b53c5acf21b29553dbc6ac5d63f10a5a05808029 /lout/misc.hh | |
parent | 723e3b247f0360f0bb583799a06642824c384d81 (diff) |
Much work on table widget.
Diffstat (limited to 'lout/misc.hh')
-rw-r--r-- | lout/misc.hh | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/lout/misc.hh b/lout/misc.hh index 3082f33c..4c20208a 100644 --- a/lout/misc.hh +++ b/lout/misc.hh @@ -223,6 +223,14 @@ public: assert (i >= 0 && this->num - i > 0); this->array[i] = t; } + + /** + * \brief Store an object at the end of the vector. + */ + inline void setLast (T t) { + assert (this->num > 0); + this->array[this->num - 1] = t; + } }; /** @@ -488,6 +496,13 @@ public: inline void set (int i, T t) { *(this->getRef(i)) = t; } + + /** + * \brief Store an object at the end of the vector. + */ + inline void setLast (T t) { + *(this->getLastRef()) = t; + } }; /** |