summaryrefslogtreecommitdiff
path: root/src/resources/mstack.h
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-13 21:38:01 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-13 21:38:01 +0300
commitaa03bdb26c736e7d506d656a5529cf6a4e9fe6b4 (patch)
tree19b7e9958b54ac138b10a606b0360c12626203af /src/resources/mstack.h
parent1a6a12a8b3310400a103e0048b7ed747fc479398 (diff)
downloadmv-aa03bdb26c736e7d506d656a5529cf6a4e9fe6b4.tar.gz
mv-aa03bdb26c736e7d506d656a5529cf6a4e9fe6b4.tar.bz2
mv-aa03bdb26c736e7d506d656a5529cf6a4e9fe6b4.tar.xz
mv-aa03bdb26c736e7d506d656a5529cf6a4e9fe6b4.zip
New stack class in graphics areas stack.
Diffstat (limited to 'src/resources/mstack.h')
-rw-r--r--src/resources/mstack.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/resources/mstack.h b/src/resources/mstack.h
index ba1a58eb2..2a568bc5a 100644
--- a/src/resources/mstack.h
+++ b/src/resources/mstack.h
@@ -78,7 +78,7 @@ struct MStack final
mPointer --;
}
- T &top()
+ T &top() const
{
return *mPointer;
}
@@ -93,6 +93,11 @@ struct MStack final
mPointer = mStack - 1;
}
+ bool empty() const
+ {
+ return mPointer == mStartPointer;
+ }
+
T *mStack;
size_t mMaxSize;