未验证 提交 8870d8e7 编写于 作者: M Matt Bierner 提交者: GitHub

Merge pull request #74546 from tony-xia/use-const

Use "const" instead of "let" in uint
......@@ -10,7 +10,7 @@ export class Uint8Matrix {
public readonly cols: number;
constructor(rows: number, cols: number, defaultValue: number) {
let data = new Uint8Array(rows * cols);
const data = new Uint8Array(rows * cols);
for (let i = 0, len = rows * cols; i < len; i++) {
data[i] = defaultValue;
}
......@@ -85,8 +85,8 @@ export function toUint32(v: number): number {
}
export function toUint32Array(arr: number[]): Uint32Array {
let len = arr.length;
let r = new Uint32Array(len);
const len = arr.length;
const r = new Uint32Array(len);
for (let i = 0; i < len; i++) {
r[i] = toUint32(arr[i]);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册