diff options
author | Adam Borowski <kilobyte@angband.pl> | 2013-11-12 07:23:05 +0100 |
---|---|---|
committer | Adam Borowski <kilobyte@angband.pl> | 2013-11-12 07:27:19 +0100 |
commit | 6d5756594c59a11fc09ffce9465cd25e8f697bc3 (patch) | |
tree | 7e1232a922af45086a07e75062cc6dcc75f5cbd3 /crawl-ref/source/store.h | |
parent | 41c3f7e50b1f5917aa9b05b327d4d47c3bdd2d23 (diff) | |
download | crawl-ref-6d5756594c59a11fc09ffce9465cd25e8f697bc3.tar.gz crawl-ref-6d5756594c59a11fc09ffce9465cd25e8f697bc3.zip |
Fix handling of hash tables bigger than 65535 elements.
You can get to 2147483647 if you wish. I added no range check -- 2147483647
should be enough for anybody, right? At least the old limit of 255 did not
cause problems in cases that weren't broken for other reasons already.
Diffstat (limited to 'crawl-ref/source/store.h')
-rw-r--r-- | crawl-ref/source/store.h | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/crawl-ref/source/store.h b/crawl-ref/source/store.h index dbdea489be..2b8a16a25a 100644 --- a/crawl-ref/source/store.h +++ b/crawl-ref/source/store.h @@ -25,12 +25,10 @@ class monster; #include "tags.h" -typedef uint16_t hash_size; typedef uint16_t vec_size; typedef uint8_t store_flags; #define VEC_MAX_SIZE 0xFFFF -#define HASH_MAX_SIZE 0xFFFF // NOTE: Changing the ordering of these enums will break savefile // compatibility. @@ -308,7 +306,7 @@ public: { return get_value(string(key)); } // std::map style interface - hash_size size() const; + unsigned int size() const; bool empty() const; void erase(const string key); |