@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.
@@ -6242,20 +6242,20 @@
6242
6242
  - (maxArrayLength * this.bitsPerElement - this.length);
6243
6243
  const lastIndex = maxArrayLength - 1;
6244
6244
  for (let index = 0; index < lastIndex; index++) {
6245
- const element = this.array[index];
6245
+ let element = this.array[index];
6246
6246
  for (let bit = 0; bit < this.bitsPerElement; bit++) {
6247
- const mask = this.getMask(bit);
6248
- if ((element & mask) === mask) {
6247
+ if (element & 1) {
6249
6248
  yield index * this.bitsPerElement + bit;
6250
6249
  }
6250
+ element >>= 1;
6251
6251
  }
6252
6252
  }
6253
- const lastElement = this.array[maxArrayLength - 1];
6253
+ let lastElement = this.array[maxArrayLength - 1];
6254
6254
  for (let bit = 0; bit < remainder; bit++) {
6255
- const mask = this.getMask(bit);
6256
- if ((lastElement & mask) === mask) {
6255
+ if (lastElement & 1) {
6257
6256
  yield lastIndex * this.bitsPerElement + bit;
6258
6257
  }
6258
+ lastElement >>= 1;
6259
6259
  }
6260
6260
  }
6261
6261
  }
@@ -6343,20 +6343,20 @@
6343
6343
  - (maxArrayLength * this.bitsPerElement - this.length);
6344
6344
  const lastIndex = maxArrayLength - 1;
6345
6345
  for (let index = 0; index < lastIndex; index++) {
6346
- const element = this.array.internalTypedArray[index];
6346
+ let element = this.array.internalTypedArray[index];
6347
6347
  for (let bit = 0; bit < this.bitsPerElement; bit++) {
6348
- const mask = this.getMask(bit);
6349
- if ((element & mask) === mask) {
6348
+ if (element & 1) {
6350
6349
  yield index * this.bitsPerElement + bit;
6351
6350
  }
6351
+ element >>= 1;
6352
6352
  }
6353
6353
  }
6354
- const lastElement = this.array.internalTypedArray[maxArrayLength - 1];
6354
+ let lastElement = this.array.internalTypedArray[maxArrayLength - 1];
6355
6355
  for (let bit = 0; bit < remainder; bit++) {
6356
- const mask = this.getMask(bit);
6357
- if ((lastElement & mask) === mask) {
6356
+ if (lastElement & 1) {
6358
6357
  yield lastIndex * this.bitsPerElement + bit;
6359
6358
  }
6359
+ lastElement >>= 1;
6360
6360
  }
6361
6361
  }
6362
6362
  }