Tweaked JavaScript code to implement inheritance more correctly.

pull/39/merge
Project Nayuki 7 years ago
parent 4eee2d43e6
commit b32c467031

@ -954,6 +954,7 @@ var qrcodegen = new function() {
* This constructor creates an empty bit buffer (length 0).
*/
function BitBuffer() {
Array.call(this);
// Packs this buffer's bits into bytes in big endian,
// padding with '0' bit values, and returns the new array.
@ -978,5 +979,6 @@ var qrcodegen = new function() {
}
BitBuffer.prototype = Object.create(Array.prototype);
BitBuffer.prototype.constructor = BitBuffer;
};

Loading…
Cancel
Save