summaryrefslogtreecommitdiffstats
path: root/pokemod/CoinList.cpp
diff options
context:
space:
mode:
authorBen Boeckel <MathStuf@gmail.com>2008-05-28 00:59:52 +0000
committerBen Boeckel <MathStuf@gmail.com>2008-05-28 00:59:52 +0000
commit4d705de01059eb04b19db68a11cea1c57084c57a (patch)
treefa6deaba07d19041c21deca010b006931dc6abe0 /pokemod/CoinList.cpp
parent8cbe19a3e1845657ccdfddbd3c4fffcaadb9ff55 (diff)
[FIX] Typechart now works
[FIX] Matrix fixed up [FIX] Pokemod map widget fixed up [FIX] FractionWidget sets stuff on ctor [FIX] Assertion used in pokemod rather than returning NULL [FIX] Fixed a bad compare in Type git-svn-id: https://pokegen.svn.sourceforge.net/svnroot/pokegen/trunk@180 6ecfd1a5-f3ed-3746-8530-beee90d26b22
Diffstat (limited to 'pokemod/CoinList.cpp')
-rw-r--r--pokemod/CoinList.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/pokemod/CoinList.cpp b/pokemod/CoinList.cpp
index d238807d..f3bff007 100644
--- a/pokemod/CoinList.cpp
+++ b/pokemod/CoinList.cpp
@@ -124,15 +124,13 @@ Script CoinList::script() const
const CoinListObject* CoinList::object(const int index) const
{
- if (objectCount() <= index)
- return NULL;
+ Q_ASSERT(index < objectCount());
return m_objects.at(index);
}
CoinListObject* CoinList::object(const int index)
{
- if (objectCount() <= index)
- return NULL;
+ Q_ASSERT(index < objectCount());
return m_objects[index];
}
@@ -184,8 +182,7 @@ CoinListObject* CoinList::newObject(CoinListObject* object)
void CoinList::deleteObject(const int index)
{
- if (objectCount() <= index)
- return;
+ Q_ASSERT(index < objectCount());
delete m_objects[index];
m_objects.removeAt(index);
}