diff options
author | Eduardo Gonzalez <ed.gonzalez3@gmail.com> | 2014-05-07 01:14:01 -0700 |
---|---|---|
committer | reaverb <reaverb.Crawl@gmail.com> | 2014-05-09 12:44:03 -0400 |
commit | f2248c4d6d8cff0e089f7a57ff6b56ad374f1117 (patch) | |
tree | c99937e797518f99096ca458489f429c140f9445 /crawl-ref/source/bitary.h | |
parent | 200594107ff01983471285d40ba187b105635a69 (diff) | |
download | crawl-ref-f2248c4d6d8cff0e089f7a57ff6b56ad374f1117.tar.gz crawl-ref-f2248c4d6d8cff0e089f7a57ff6b56ad374f1117.zip |
Expose bitset's count function through FixedBitVector...
and use it to speed up counting runes in a few places.
Vaults and Zot entrances report activated runes by name, so weren't updated.
Diffstat (limited to 'crawl-ref/source/bitary.h')
-rw-r--r-- | crawl-ref/source/bitary.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crawl-ref/source/bitary.h b/crawl-ref/source/bitary.h index 4fd7e2f1f0..8cadb3c182 100644 --- a/crawl-ref/source/bitary.h +++ b/crawl-ref/source/bitary.h @@ -78,6 +78,11 @@ public: data[i] = value; } + inline unsigned int count() const + { + return data.count(); + } + inline FixedBitVector<SIZE>& operator|=(const FixedBitVector<SIZE>&x) { data |= x.data; |