diff options
Diffstat (limited to 'source/core/list.h')
| -rw-r--r-- | source/core/list.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/source/core/list.h b/source/core/list.h index 6df60b74b..cddcbb6c0 100644 --- a/source/core/list.h +++ b/source/core/list.h @@ -199,6 +199,15 @@ namespace Slang return buffer[_count-1]; } + void RemoveLast() + { +#ifdef _DEBUG + if (_count == 0) + throw "Index out of range."; +#endif + _count--; + } + inline void SwapWith(List<T, TAllocator> & other) { T* tmpBuffer = this->buffer; |
