From: Jérôme Benoit Date: Mon, 27 Mar 2023 12:57:28 +0000 (+0200) Subject: refactor: remove unneeded intermediate variable in id tags cache code X-Git-Tag: v1.2.0-1~2 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=728e01f09f2b43946aab50eb2ed9673bf2d2daa3;p=e-mobility-charging-stations-simulator.git refactor: remove unneeded intermediate variable in id tags cache code Signed-off-by: Jérôme Benoit --- 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