From 728e01f09f2b43946aab50eb2ed9673bf2d2daa3 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Mon, 27 Mar 2023 14:57:28 +0200 Subject: [PATCH] refactor: remove unneeded intermediate variable in id tags cache code MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- src/charging-station/IdTagsCache.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/charging-station/IdTagsCache.ts b/src/charging-station/IdTagsCache.ts index 8d402783..e5d28181 100644 --- a/src/charging-station/IdTagsCache.ts +++ b/src/charging-station/IdTagsCache.ts @@ -81,8 +81,10 @@ export class IdTagsCache { private getConnectorAffinityIdTag(chargingStation: ChargingStation, connectorId: number): string { const file = ChargingStationUtils.getIdTagsFile(chargingStation.stationInfo); const idTags = this.getIdTags(file); - const hashId = chargingStation.stationInfo.hashId; - const addressableKey = this.getIdTagsCacheIndexesAddressableKey(file, hashId); + const addressableKey = this.getIdTagsCacheIndexesAddressableKey( + file, + chargingStation.stationInfo.hashId + ); this.idTagsCachesAddressableIndexes.set( addressableKey, (chargingStation.index - 1 + (connectorId - 1)) % idTags.length -- 2.34.1