summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-05-13 22:33:36 +0300
committerAndrei Karas <akaras@inbox.ru>2015-05-13 22:33:36 +0300
commit3206e9b2b839c603a6857a80f73fc814647e2fbc (patch)
tree21cc92457b54dad7add770a4374c65073803439d
parent88bbf7389298270c6d840b789184acee5ea43180 (diff)
downloadmanaplus-3206e9b2b839c603a6857a80f73fc814647e2fbc.tar.gz
manaplus-3206e9b2b839c603a6857a80f73fc814647e2fbc.tar.bz2
manaplus-3206e9b2b839c603a6857a80f73fc814647e2fbc.tar.xz
manaplus-3206e9b2b839c603a6857a80f73fc814647e2fbc.zip
Remove additional checks from mstack.
-rw-r--r--src/resources/mstack.h15
1 files changed, 3 insertions, 12 deletions
diff --git a/src/resources/mstack.h b/src/resources/mstack.h
index 2a568bc5a..3e7c28b80 100644
--- a/src/resources/mstack.h
+++ b/src/resources/mstack.h
@@ -54,28 +54,19 @@ struct MStack final
T &getPop()
{
- if (mPointer == mStartPointer)
- logger->log("error: minimal stack size reached");
- else
- mPointer --;
+ mPointer --;
return *mPointer;
}
const T &getPopConst()
{
- if (mPointer == mStartPointer)
- logger->log("error: minimal stack size reached");
- else
- mPointer --;
+ mPointer --;
return *mPointer;
}
void pop()
{
- if (mPointer == mStartPointer)
- logger->log("error: minimal stack size reached");
- else
- mPointer --;
+ mPointer --;
}
T &top() const