@blackglory/structures 0.10.18 → 0.10.19

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -6236,20 +6236,20 @@ class BitSet {
6236
6236
  - (maxArrayLength * this.bitsPerElement - this.length);
6237
6237
  const lastIndex = maxArrayLength - 1;
6238
6238
  for (let index = 0; index < lastIndex; index++) {
6239
- const element = this.array[index];
6239
+ let element = this.array[index];
6240
6240
  for (let bit = 0; bit < this.bitsPerElement; bit++) {
6241
- const mask = this.getMask(bit);
6242
- if ((element & mask) === mask) {
6241
+ if (element & 1) {
6243
6242
  yield index * this.bitsPerElement + bit;
6244
6243
  }
6244
+ element >>= 1;
6245
6245
  }
6246
6246
  }
6247
- const lastElement = this.array[maxArrayLength - 1];
6247
+ let lastElement = this.array[maxArrayLength - 1];
6248
6248
  for (let bit = 0; bit < remainder; bit++) {
6249
- const mask = this.getMask(bit);
6250
- if ((lastElement & mask) === mask) {
6249
+ if (lastElement & 1) {
6251
6250
  yield lastIndex * this.bitsPerElement + bit;
6252
6251
  }
6252
+ lastElement >>= 1;
6253
6253
  }
6254
6254
  }
6255
6255
  }
@@ -6337,20 +6337,20 @@ class TypedBitSet {
6337
6337
  - (maxArrayLength * this.bitsPerElement - this.length);
6338
6338
  const lastIndex = maxArrayLength - 1;
6339
6339
  for (let index = 0; index < lastIndex; index++) {
6340
- const element = this.array.internalTypedArray[index];
6340
+ let element = this.array.internalTypedArray[index];
6341
6341
  for (let bit = 0; bit < this.bitsPerElement; bit++) {
6342
- const mask = this.getMask(bit);
6343
- if ((element & mask) === mask) {
6342
+ if (element & 1) {
6344
6343
  yield index * this.bitsPerElement + bit;
6345
6344
  }
6345
+ element >>= 1;
6346
6346
  }
6347
6347
  }
6348
- const lastElement = this.array.internalTypedArray[maxArrayLength - 1];
6348
+ let lastElement = this.array.internalTypedArray[maxArrayLength - 1];
6349
6349
  for (let bit = 0; bit < remainder; bit++) {
6350
- const mask = this.getMask(bit);
6351
- if ((lastElement & mask) === mask) {
6350
+ if (lastElement & 1) {
6352
6351
  yield lastIndex * this.bitsPerElement + bit;
6353
6352
  }
6353
+ lastElement >>= 1;
6354
6354
  }
6355
6355
  }
6356
6356
  }