mirror of
https://github.com/DarthAffe/RGB.NET.git
synced 2026-11-11 13:06:24 +00:00
Fixed some code issues
This commit is contained in:
1 parent
02235a3f7f
commit
82050b8d5a
1 file changed
+1
-2
@@ -50,8 +50,7 @@ public static class IdGenerator
|
|||||||
idMapping.Add(id, mappedId);
|
idMapping.Add(id, mappedId);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!counterMapping.ContainsKey(mappedId))
|
counterMapping.TryAdd(mappedId, 0);
|
||||||
counterMapping.Add(mappedId, 0);
|
|
||||||
|
|
||||||
int counter = ++counterMapping[mappedId];
|
int counter = ++counterMapping[mappedId];
|
||||||
return counter <= 1 ? mappedId : $"{mappedId} ({counter})";
|
return counter <= 1 ? mappedId : $"{mappedId} ({counter})";
|
||||||
|
|||||||
Reference in new issue
Block a user