From bc623a4ef1bdf049842d8282883a2eeeb5455e50 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Sun, 23 Jun 2013 22:53:29 +0000 Subject: [PATCH] base: Array::Pop() returns the popped element. --- src/lol/base/array.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lol/base/array.h b/src/lol/base/array.h index d30b9f72..b60f066b 100644 --- a/src/lol/base/array.h +++ b/src/lol/base/array.h @@ -162,10 +162,12 @@ public: *this << x; } - inline void Pop() + inline T Pop() { ASSERT(m_count > 0); + Element tmp = Last(); Remove(m_count - 1, 1); + return tmp; } void Swap(int pos1, int pos2)