Modernise forEach loops throughout

This commit is contained in:
Casper Warden
2020-11-19 16:27:29 +00:00
parent 5c7fcd09bd
commit 7b41239a39
83 changed files with 363 additions and 361 deletions

View File

@@ -25,13 +25,13 @@ export class SystemMessageMessage implements MessageBase
return (this.MethodData['Method'].length + 1) + this.calculateVarVarSize(this.ParamList, 'Parameter', 1) + 49;
}
calculateVarVarSize(block: object[], paramName: string, extraPerVar: number): number
calculateVarVarSize(block: {[key: string]: any}[], paramName: string, extraPerVar: number): number
{
let size = 0;
block.forEach((bl: any) =>
for (const bl of block)
{
size += bl[paramName].length + extraPerVar;
});
}
return size;
}