[Issue 4717] std.bitmanip.BitArray changes
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Aug 24 14:02:39 PDT 2010
http://d.puremagic.com/issues/show_bug.cgi?id=4717
--- Comment #6 from bearophile_hugs at eml.cc 2010-08-24 14:02:31 PDT ---
For efficiency on 64 bit systems too you may change this code from the BitArray
struct:
struct BitArray
{
size_t len;
uint* ptr;
...
void init(void[] v, size_t numbits)
in
{
assert(numbits <= v.length * 8);
assert((v.length & 3) == 0);
}
Into:
struct BitArray
{
size_t len;
size_t* ptr; // changed here
...
void init(void[] v, size_t numbits)
in
{
assert(numbits <= v.length * 8);
assert(v.length % size_t.sizeof == 0); // changed here
}
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
More information about the Digitalmars-d-bugs
mailing list