summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/directn.cc
diff options
context:
space:
mode:
authorMatthew Cline <zelgadis@sourceforge.net>2009-11-10 02:08:57 -0800
committerMatthew Cline <zelgadis@sourceforge.net>2009-11-10 02:13:09 -0800
commit75921593c0f8f33133034bc56dc94d956d2afd67 (patch)
treef674de5fd73a8ab1dd507c3813e2dcde90327d91 /crawl-ref/source/directn.cc
parent5e9e9773f748ab17c8298cd212c77bf5ea1b2051 (diff)
downloadcrawl-ref-75921593c0f8f33133034bc56dc94d956d2afd67.tar.gz
crawl-ref-75921593c0f8f33133034bc56dc94d956d2afd67.zip
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.
Diffstat (limited to 'crawl-ref/source/directn.cc')
-rw-r--r--crawl-ref/source/directn.cc2
1 files changed, 1 insertions, 1 deletions
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();