From 75921593c0f8f33133034bc56dc94d956d2afd67 Mon Sep 17 00:00:00 2001 From: Matthew Cline Date: Tue, 10 Nov 2009 02:08:57 -0800 Subject: CrawlHashTable: reduce RAM overhead The RAM overhead for an unused CrawlHash table has been reduced from 32 to 4 (on 32 bit systems), with an increased overhead of 4 bytes for ones which are used. This leads to a 35% RAM reduction for item_def instances with an unused props field. --- crawl-ref/source/directn.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crawl-ref/source/directn.cc') diff --git a/crawl-ref/source/directn.cc b/crawl-ref/source/directn.cc index 7d8d3a8392..23f0cba945 100644 --- a/crawl-ref/source/directn.cc +++ b/crawl-ref/source/directn.cc @@ -2839,7 +2839,7 @@ void set_feature_desc_short(const std::string &base_name, CrawlHashTable &props = env.properties; if (!props.exists(SHORT_DESC_KEY)) - props[SHORT_DESC_KEY].new_table(SV_STR); + props[SHORT_DESC_KEY].new_table(); CrawlHashTable &desc_table = props[SHORT_DESC_KEY].get_table(); -- cgit v1.2.3-54-g00ecf