mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
Use EmptyResults to improve code quality
This commit is contained in:
parent
9be8b71f09
commit
b07420a193
1 changed files with 3 additions and 2 deletions
|
|
@ -22,6 +22,7 @@ namespace Flow.Launcher.Plugin.Calculator
|
|||
private const string Comma = ",";
|
||||
private const string Dot = ".";
|
||||
private const string IcoPath = "Images/calculator.png";
|
||||
private static readonly List<Result> EmptyResults = [];
|
||||
|
||||
internal static PluginInitContext Context { get; set; } = null!;
|
||||
|
||||
|
|
@ -47,7 +48,7 @@ namespace Flow.Launcher.Plugin.Calculator
|
|||
{
|
||||
if (string.IsNullOrWhiteSpace(query.Search))
|
||||
{
|
||||
return new List<Result>();
|
||||
return EmptyResults;
|
||||
}
|
||||
|
||||
try
|
||||
|
|
@ -138,7 +139,7 @@ namespace Flow.Launcher.Plugin.Calculator
|
|||
};
|
||||
}
|
||||
|
||||
return new List<Result>();
|
||||
return EmptyResults;
|
||||
}
|
||||
|
||||
private static string PowMatchEvaluator(Match m)
|
||||
|
|
|
|||
Loading…
Reference in a new issue