summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/hiscores.cc
diff options
context:
space:
mode:
authordshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-28 08:47:30 +0000
committerdshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573>2007-05-28 08:47:30 +0000
commit20a6609453ee2b51c388c296516c1abc1beab1d2 (patch)
tree201d735a3a4d66471005cb763078a6c05056752c /crawl-ref/source/hiscores.cc
parent7aed4c41d7fa0f9d70df56a82abbe69061e56269 (diff)
downloadcrawl-ref-20a6609453ee2b51c388c296516c1abc1beab1d2.tar.gz
crawl-ref-20a6609453ee2b51c388c296516c1abc1beab1d2.zip
Preliminary integration of Zooko's Xom patch (untested).
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1489 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/hiscores.cc')
-rw-r--r--crawl-ref/source/hiscores.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc
index 6def50115d..6dcaad88da 100644
--- a/crawl-ref/source/hiscores.cc
+++ b/crawl-ref/source/hiscores.cc
@@ -651,15 +651,15 @@ static level_area_type str_to_level_area_type(const std::string &s)
return (LEVEL_DUNGEON);
}
-static int str_to_god(const std::string &god)
+static god_type str_to_god(const std::string &god)
{
if (god.empty())
return GOD_NO_GOD;
for (int i = GOD_NO_GOD; i < NUM_GODS; ++i)
{
- if (god_name(i) == god)
- return (i);
+ if (god_name(static_cast<god_type>(i)) == god)
+ return (static_cast<god_type>(i));
}
return (GOD_NO_GOD);
}
@@ -898,7 +898,7 @@ bool scorefile_entry::parse_obsolete_scoreline(const std::string &line)
str = hs_nextint(inbuf);
intel = hs_nextint(inbuf);
dex = hs_nextint(inbuf);
- god = hs_nextint(inbuf);
+ god = static_cast<god_type>(hs_nextint(inbuf));
piety = hs_nextint(inbuf);
penance = hs_nextint(inbuf);
@@ -1014,7 +1014,7 @@ void scorefile_entry::reset()
intel = -1;
dex = -1;
damage = -1;
- god = -1;
+ god = GOD_NO_GOD;
piety = -1;
penance = -1;
wiz_mode = 0;