summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/hiscores.cc
diff options
context:
space:
mode:
authorharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 14:49:06 +0000
committerharanp <haranp@c06c8d41-db1a-0410-9941-cceddc491573>2007-10-25 14:49:06 +0000
commit2b246a2f1016744c425f9cc9009cfd6b780619b3 (patch)
tree290c2d7c5378fbc769889cb2c8c077b98e484723 /crawl-ref/source/hiscores.cc
parent54d4d07375bd81654b6b4bca860a4ca8ae045e1e (diff)
downloadcrawl-ref-2b246a2f1016744c425f9cc9009cfd6b780619b3.tar.gz
crawl-ref-2b246a2f1016744c425f9cc9009cfd6b780619b3.zip
Type safety and code cleanup.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2569 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/hiscores.cc')
-rw-r--r--crawl-ref/source/hiscores.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index c75b22b62d..ee9cc0a3e6 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -659,7 +659,9 @@ void scorefile_entry::set_base_xlog_fields() const
fields->add_field("lv", SCORE_VERSION);
fields->add_field("name", "%s", name.c_str());
fields->add_field("uid", "%d", uid);
- fields->add_field("race", "%s", species_name(race, lvl).c_str());
+ fields->add_field("race", "%s",
+ species_name(static_cast<species_type>(race),
+ lvl).c_str());
fields->add_field("cls", "%s", get_class_name(cls));
fields->add_field("char", "%s%s",
get_species_abbrev(race),
@@ -1224,7 +1226,8 @@ scorefile_entry::character_description(death_desc_verbosity verbosity) const
else
{
snprintf( buf, HIGHSCORE_SIZE, "%8ld %s the %s %s (level %d",
- points, name.c_str(), species_name(race, lvl).c_str(),
+ points, name.c_str(),
+ species_name(static_cast<species_type>(race), lvl).c_str(),
get_class_name(cls), lvl );
desc = buf;
}
@@ -1248,7 +1251,7 @@ scorefile_entry::character_description(death_desc_verbosity verbosity) const
if (verbose)
{
- std::string srace = species_name( race, lvl );
+ std::string srace = species_name(static_cast<species_type>(race), lvl);
snprintf( scratch, INFO_SIZE, "Began as a%s %s %s",
is_vowel(srace[0]) ? "n" : "",
srace.c_str(),