summaryrefslogtreecommitdiffstats
path: root/pokemod/MapWildList.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/MapWildList.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/MapWildList.cpp')
-rw-r--r--pokemod/MapWildList.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/pokemod/MapWildList.cpp b/pokemod/MapWildList.cpp
index b9fec1f1..c5610252 100644
--- a/pokemod/MapWildList.cpp
+++ b/pokemod/MapWildList.cpp
@@ -148,15 +148,13 @@ bool MapWildList::time(const int time) const
const MapWildListEncounter* MapWildList::encounter(const int index) const
{
- if (encounterCount() <= index)
- return NULL;
+ Q_ASSERT(index < encounterCount());
return m_encounters.at(index);
}
MapWildListEncounter* MapWildList::encounter(const int index)
{
- if (encounterCount() <= index)
- return NULL;
+ Q_ASSERT(index < encounterCount());
return m_encounters[index];
}
@@ -208,8 +206,7 @@ MapWildListEncounter* MapWildList::newEncounter(MapWildListEncounter* encounter)
void MapWildList::deleteEncounter(const int index)
{
- if (encounterCount() <= index)
- return;
+ Q_ASSERT(index < encounterCount());
delete m_encounters[index];
m_encounters.removeAt(index);
}