1
0
mirror of https://github.com/DarthAffe/RGB.NET.git synced 2025-12-12 17:48:31 +00:00

Fixed some code issues

This commit is contained in:
Darth Affe 2023-04-11 00:26:46 +02:00
parent 02235a3f7f
commit 82050b8d5a

View File

@ -50,8 +50,7 @@ public static class IdGenerator
idMapping.Add(id, mappedId);
}
if (!counterMapping.ContainsKey(mappedId))
counterMapping.Add(mappedId, 0);
counterMapping.TryAdd(mappedId, 0);
int counter = ++counterMapping[mappedId];
return counter <= 1 ? mappedId : $"{mappedId} ({counter})";