LazarSoft / jsqrcode

Javascript QRCode scanner
http://www.webqr.com
Apache License 2.0
3.98k stars 1.16k forks source link

remove Array.prototype.remove function #28

Closed bierdok closed 6 years ago

bierdok commented 10 years ago

beware, for example this function becomes an array element in firefox. if it is really necessary, don't declare on a native object. moreover, I don't see the usefulness of this function in this project.

saschagehlich commented 10 years ago

+1

saschagehlich commented 10 years ago

+1 +1 +1 +1

bierdok commented 10 years ago

this project seems abandoned... several issues unfixed.

drbsoftware commented 10 years ago

In findpat.js, there is a line:

    this.possibleCenters.remove(i);

which needs to be modified to:

    this.possibleCenters.splice(i, 1);

I think that this line is why the Array.prototype.remove was added. In the Java original sources, in zxing/qrcode/detector/FinderPatternFinder.java, possibleCenters is a List and the remove(int i) method on a list removes the item at offset i.