Skip to content

Commit 0067293

Browse files
committed
Use TryAdd, copilot thinks it is faster
1 parent 08c3cd5 commit 0067293

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/AliFlux/VexTile.Renderers.Mvt.AliFlux/SKColorFactory.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public static SKColor LogColor(SKColor color, [CallerMemberName] string callerNa
4545
// Use the packed ARGB from the color directly
4646
uint key = (uint)color;
4747

48-
Colours[key] = color;
48+
_ = Colours.TryAdd(key, color);
4949

5050
#if DEBUG_COLORS
5151
var hex = MakeKeyHex(color.Red, color.Green, color.Blue, color.Alpha);

0 commit comments

Comments
 (0)