diff options
author | Adam Borowski <kilobyte@angband.pl> | 2011-11-23 03:39:39 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2011-11-23 03:41:27 +0100 |
commit | 441205f0d25fdc839b3e308df991b537e8e818b1 (patch) | |
tree | 64865332ef160b785ad6d33ccdda938c8a4ee68b /crawl-ref/source/skills2.h | |
parent | 70eebec9c8ed5ccf27af74ff233dde48b93a46ea (diff) | |
download | crawl-ref-441205f0d25fdc839b3e308df991b537e8e818b1.tar.gz crawl-ref-441205f0d25fdc839b3e308df991b537e8e818b1.zip |
Remove a number of useless is_invalid_skill() checks.
There's no point in ever having gaps in this enum -- even if a skill is
removed, it is still valid until a save compat break.
Diffstat (limited to 'crawl-ref/source/skills2.h')
-rw-r--r-- | crawl-ref/source/skills2.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crawl-ref/source/skills2.h b/crawl-ref/source/skills2.h index cf7b635398..7fcc1b70c6 100644 --- a/crawl-ref/source/skills2.h +++ b/crawl-ref/source/skills2.h @@ -71,7 +71,6 @@ bool is_antitrained(skill_type sk); bool antitrain_other(skill_type sk, bool show_zero); void skill_menu(int flag = 0, int exp = 0); -bool is_invalid_skill(skill_type skill); void dump_skills(std::string &text); int skill_transfer_amount(skill_type sk); int transfer_skill_points(skill_type fsk, skill_type tsk, int skp_max, @@ -112,4 +111,9 @@ static const skill_type skill_display_order[] = static const int ndisplayed_skills = ARRAYSZ(skill_display_order); +static inline bool is_invalid_skill(skill_type skill) +{ + return (skill < SK_FIRST_SKILL || skill >= NUM_SKILLS); +} + #endif |