summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/species.cc
diff options
context:
space:
mode:
authorRobert Vollmert <rvollmert@gmx.net>2009-10-23 18:35:26 +0200
committerRobert Vollmert <rvollmert@gmx.net>2009-10-23 20:30:14 +0200
commit921c44bb1d1e0ddea50fffe518a214f626a9d11b (patch)
treeda74349e851e7f1efcc42ed30e354d12e23935dd /crawl-ref/source/species.cc
parentbea4408fe95cd8660cafc4dbedba321ebc4f0b12 (diff)
downloadcrawl-ref-921c44bb1d1e0ddea50fffe518a214f626a9d11b.tar.gz
crawl-ref-921c44bb1d1e0ddea50fffe518a214f626a9d11b.zip
Assert get_species argument.
Diffstat (limited to 'crawl-ref/source/species.cc')
-rw-r--r--crawl-ref/source/species.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/crawl-ref/source/species.cc b/crawl-ref/source/species.cc
index d55f871851..ab0556945d 100644
--- a/crawl-ref/source/species.cc
+++ b/crawl-ref/source/species.cc
@@ -61,8 +61,7 @@ species_type random_draconian_player_species()
species_type get_species(const int index)
{
- if (index < 0 || (unsigned int) index >= ARRAYSZ(old_species_order))
- return (SP_UNKNOWN);
+ ASSERT(index >= 0 && index < ARRAYSZ(old_species_order));
return (Options.use_old_selection_order ? old_species_order[index]
: new_species_order[index]);
@@ -127,7 +126,7 @@ int get_species_index_by_name( const char *name )
return (sp);
}
-const char *get_species_abbrev( int which_species )
+const char *get_species_abbrev(int which_species)
{
ASSERT( which_species > 0 && which_species < NUM_SPECIES );
@@ -135,7 +134,7 @@ const char *get_species_abbrev( int which_species )
}
// Needed for debug.cc and hiscores.cc.
-int get_species_by_abbrev( const char *abbrev )
+int get_species_by_abbrev(const char *abbrev)
{
int i;
COMPILE_CHECK(ARRAYSZ(Species_Abbrev_List) == NUM_SPECIES, c1);