From 6ce2b7f7aff6a06baf5e6b60948d03aa6a87c867 Mon Sep 17 00:00:00 2001 From: Sergiy Lavrynenko Date: Wed, 14 Aug 2024 17:15:43 +0100 Subject: [PATCH] codacy related improvements --- src/log.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/log.ts b/src/log.ts index 8fa7e36..668cf26 100644 --- a/src/log.ts +++ b/src/log.ts @@ -1042,7 +1042,7 @@ function computeVerboseAlias(): TMapVerboseReverse { const val = gMapVerbose[key as any]; const name = val; if( name ) - m[name] = parseInt( key as any ); + m[name] = parseInt( key ); } m.empty = m.silent ?? 0; // alias m.none = m.silent ?? 0; // alias @@ -1098,7 +1098,10 @@ export function verboseGet(): number { return cc.toInteger( gVerboseLevel ); } export function verboseSet( vl?: TLogArgument ): void { - gVerboseLevel = 0 + ( vl ? parseInt( vl.toString() ) : gVerboseLevelDefaultValue ); + gVerboseLevel = 0 + ( vl + ? parseInt( ( vl as string ).toString() ) + : gVerboseLevelDefaultValue + ); } export function verboseParse( s: string ): number {