8000
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 587cf48 commit 0838441Copy full SHA for 0838441
cbor.js
@@ -37,14 +37,14 @@ function encode(value) {
37
var newByteLength = data.byteLength;
38
var requiredLength = offset + length;
39
while (newByteLength < requiredLength)
40
- newByteLength *= 2;
+ newByteLength <<= 1;
41
if (newByteLength !== data.byteLength) {
42
var oldDataView = dataView;
43
data = new ArrayBuffer(newByteLength);
44
dataView = new DataView(data);
45
var uint32count = (offset + 3) >> 2;
46
for (var i = 0; i < uint32count; ++i)
47
- dataView.setUint32(i * 4, oldDataView.getUint32(i * 4));
+ dataView.setUint32(i << 2, oldDataView.getUint32(i << 2));
48
}
49
50
lastLength = length;
0 commit comments