summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/invent.cc
diff options
context:
space:
mode:
authorNeil Moore <neil@s-z.org>2014-05-29 13:08:59 -0400
committerNeil Moore <neil@s-z.org>2014-05-29 13:19:12 -0400
commit8a4a71836c47770cf45212f7bf790c2a58937402 (patch)
tree49e02ca6b7fd76f57681aa1b1314c841187e21d3 /crawl-ref/source/invent.cc
parent1c38e164c05f2e4a26c45ea7df6749b15a19fd31 (diff)
downloadcrawl-ref-8a4a71836c47770cf45212f7bf790c2a58937402.tar.gz
crawl-ref-8a4a71836c47770cf45212f7bf790c2a58937402.zip
Refactor a bit.
Diffstat (limited to 'crawl-ref/source/invent.cc')
-rw-r--r--crawl-ref/source/invent.cc11
1 files changed, 2 insertions, 9 deletions
diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc
index 8caabd8f3a..5a1d7196fc 100644
--- a/crawl-ref/source/invent.cc
+++ b/crawl-ref/source/invent.cc
@@ -19,7 +19,6 @@
#include "artefact.h"
#include "clua.h"
#include "colour.h"
-#include "coord.h" // for ASSERT_IN_BOUNDS
#include "command.h"
#include "decks.h"
#include "describe.h"
@@ -38,7 +37,6 @@
#include "stuff.h"
#include "mon-util.h"
#include "state.h"
-#include "terrain.h" // for actor_at
#include "throw.h"
#ifdef USE_TILE
@@ -84,13 +82,8 @@ InvEntry::InvEntry(const item_def &i, bool show_bg)
if (item_is_stationary_net(i))
{
- // Stationary nets should not be in inventory etc.
- ASSERT_IN_BOUNDS(i.pos);
- actor * const a = actor_at(i.pos);
- ASSERTM(a, "No actor under stationary net at (%d,%d)",
- i.pos.x, i.pos.y);
-
- text += make_stringf(" (holding %s)", a->name(DESC_A).c_str());
+ text += make_stringf(" (holding %s)",
+ net_holdee(i)->name(DESC_A).c_str());
}
if (i.base_type != OBJ_GOLD && in_inventory(i))