optimize code

This commit is contained in:
弘韬 张 2021-01-15 15:56:28 +08:00
parent 723265a865
commit 6655a8f168

View file

@ -25,9 +25,9 @@ namespace Flow.Launcher.Storage
public void Add(Result result)
{
var key = result.ToString();
if (records.TryGetValue(key, out int value))
if (records.ContainsKey(key))
{
records[key] = value + 1;
records[key]++;
}
else
{