From 9304ae6cc3684377e50e6fcbc3d13e80fa092b6a Mon Sep 17 00:00:00 2001 From: haranp Date: Tue, 24 Apr 2007 22:38:41 +0000 Subject: Cleaned up shop-handling code considerably. Instead of shops passing around global id_arr arrays, shops use the newly added third argument to item_def::name() which indicates whether to override item ID status. This means that the shop ID SIGHUP protection is now unnecessary; it's been removed. Hopefully I caught all the places where the stash tracker tries to get item names and fixed them, but I might have missed something. git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@1359 c06c8d41-db1a-0410-9941-cceddc491573 --- crawl-ref/source/invent.cc | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'crawl-ref/source/invent.cc') diff --git a/crawl-ref/source/invent.cc b/crawl-ref/source/invent.cc index a00e69a77b..f2b7174405 100644 --- a/crawl-ref/source/invent.cc +++ b/crawl-ref/source/invent.cc @@ -99,7 +99,7 @@ std::string InvEntry::get_text() const if (InvEntry::show_prices) { - int value = item_value(*item, temp_id, true); + const int value = item_value(*item, show_prices); if (value > 0) snprintf(suffix, sizeof suffix, " (%d gold)", value); @@ -164,14 +164,10 @@ void InvEntry::add_class_hotkeys(const item_def &i) } bool InvEntry::show_prices = false; -char InvEntry::temp_id[4][50]; void InvEntry::set_show_prices(bool doshow) { - if ((show_prices = doshow)) - { - memset(temp_id, 1, sizeof temp_id); - } + show_prices = doshow; } InvShowPrices::InvShowPrices(bool doshow) -- cgit v1.2.3-54-g00ecf