From 0b23da9f3754bcbd9ca3561f4c9c8d77cd6c598b Mon Sep 17 00:00:00 2001 From: haranp Date: Mon, 16 Feb 2009 10:36:42 +0000 Subject: Fix some more bad accesses to strings. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@9098 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/hiscores.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'crawl-ref') diff --git a/crawl-ref/source/hiscores.cc b/crawl-ref/source/hiscores.cc index cf27ba0992..331d5ae67b 100644 --- a/crawl-ref/source/hiscores.cc +++ b/crawl-ref/source/hiscores.cc @@ -1423,7 +1423,7 @@ std::string scorefile_entry::death_description(death_desc_verbosity verbosity) } // put the damage on the weapon line if there is one - if (auxkilldata[0] == 0) + if (auxkilldata.empty()) needs_damage = true; break; @@ -1432,7 +1432,7 @@ std::string scorefile_entry::death_description(death_desc_verbosity verbosity) break; case KILLED_BY_CLOUD: - if (auxkilldata[0] == 0) + if (auxkilldata.empty()) desc += terse? "cloud" : "Engulfed by a cloud"; else { @@ -1846,7 +1846,7 @@ std::string scorefile_entry::death_description(death_desc_verbosity verbosity) { desc += _hiscore_newline_string(); - if (death_type == KILLED_BY_MONSTER && auxkilldata[0]) + if (death_type == KILLED_BY_MONSTER && !auxkilldata.empty()) { if (!semiverbose) { -- cgit v1.2.3-54-g00ecf