From: Chris Duncan Date: Wed, 13 Aug 2025 15:04:33 +0000 (-0700) Subject: Use ternary operator instead of casting bool to int. X-Git-Tag: v0.10.5~41^2~110 X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=7108e65cf6859d2c614b9067ed02a906572a907c;p=libnemo.git Use ternary operator instead of casting bool to int. --- diff --git a/src/lib/crypto/nano-nacl.ts b/src/lib/crypto/nano-nacl.ts index 36ee056..e23bdd6 100644 --- a/src/lib/crypto/nano-nacl.ts +++ b/src/lib/crypto/nano-nacl.ts @@ -190,8 +190,7 @@ export class NanoNaCl { // the inner loop since a[x]*a[y] + a[y]*a[x] = 2*a[x]*a[y] for (let i = 0; i < 16; i++) { for (let j = i; j < 16; j++) { - //@ts-expect-error - t[i + j] += a[i] * a[j] * ((i < j) + 1) + t[i + j] += a[i] * a[j] * (i < j ? 2 : 1) } }