summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/item_use.cc
diff options
context:
space:
mode:
authorVsevolod Kozlov <zaba@thorium.homeunix.org>2009-11-06 15:54:52 +0300
committerJude Brown <bookofjude@users.sourceforge.net>2009-11-06 23:22:04 +1000
commit8aaaca3d1c38a41d88b6dddf55fa48fd9aecb539 (patch)
tree7e3d75c7a1f32cc41facc17d36986df022a5870a /crawl-ref/source/item_use.cc
parentcddc002566e2f235a3785e12d534ebc0202bb53e (diff)
downloadcrawl-ref-8aaaca3d1c38a41d88b6dddf55fa48fd9aecb539.tar.gz
crawl-ref-8aaaca3d1c38a41d88b6dddf55fa48fd9aecb539.zip
Rename is_valid_item to item_def::is_valid.
Signed-off-by: Jude Brown <bookofjude@users.sourceforge.net>
Diffstat (limited to 'crawl-ref/source/item_use.cc')
-rw-r--r--crawl-ref/source/item_use.cc10
1 files changed, 5 insertions, 5 deletions
diff --git a/crawl-ref/source/item_use.cc b/crawl-ref/source/item_use.cc
index 3380880fd1..8e7c500f98 100644
--- a/crawl-ref/source/item_use.cc
+++ b/crawl-ref/source/item_use.cc
@@ -262,7 +262,7 @@ bool wield_weapon(bool auto_wield, int slot, bool show_weff_messages,
// Prompt if not using the auto swap command, or if the swap slot
// is empty.
if (item_slot != PROMPT_GOT_SPECIAL
- && (!auto_wield || !is_valid_item(you.inv[item_slot]) || !good_swap))
+ && (!auto_wield || !you.inv[item_slot].is_valid() || !good_swap))
{
if (!auto_wield)
{
@@ -951,7 +951,7 @@ bool can_wear_armour(const item_def &item, bool verbose, bool ignore_temporary)
bool do_wear_armour(int item, bool quiet)
{
const item_def &invitem = you.inv[item];
- if (!is_valid_item(invitem))
+ if (!invitem.is_valid())
{
if (!quiet)
mpr("You don't have any such object.");
@@ -2172,14 +2172,14 @@ static void identify_floor_missiles_matching(item_def mitem, int idflags)
void _merge_ammo_in_inventory(int slot)
{
- if (!is_valid_item(you.inv[slot]))
+ if (!you.inv[slot].is_valid())
return;
bool done_anything = false;
for (int i = 0; i < ENDOFPACK; ++i)
{
- if (i == slot || !is_valid_item(you.inv[i]))
+ if (i == slot || !you.inv[i].is_valid())
continue;
// Merge with the thrower slot. This could be a bad
@@ -2242,7 +2242,7 @@ bool throw_it(bolt &pbolt, int throw_2, bool teleport, int acc_bonus,
pbolt.set_target(thr);
item_def& thrown = you.inv[throw_2];
- ASSERT(is_valid_item(thrown));
+ ASSERT(thrown.is_valid());
// Figure out if we're thrown or launched.
const launch_retval projected = is_launched(&you, you.weapon(), thrown);