Final misc optimizations

This commit is contained in:
JustArchi
2020-03-06 00:18:30 +01:00
parent b0ef7309b8
commit 12b940d1df
2 changed files with 4 additions and 4 deletions

View File

@@ -816,7 +816,7 @@ namespace ArchiSteamFarm {
continue;
}
value.AppIDs = new HashSet<uint>();
value.AppIDs = new HashSet<uint>(appIDs.Children.Count);
foreach (string appIDText in appIDs.Children.Select(app => app.Value)) {
if (!uint.TryParse(appIDText, out uint appID) || (appID == 0)) {

View File

@@ -386,7 +386,7 @@ namespace ArchiSteamFarm {
return;
}
List<Task> backgroundTasks = null;
HashSet<Task> backgroundTasks = null;
foreach (HtmlNode htmlNode in htmlNodes) {
HtmlNode statsNode = htmlNode.SelectSingleNode(".//div[@class='badge_title_stats_content']");
@@ -671,7 +671,7 @@ namespace ArchiSteamFarm {
break;
default:
if (backgroundTasks == null) {
backgroundTasks = new List<Task>();
backgroundTasks = new HashSet<Task>();
}
backgroundTasks.Add(task);
@@ -1024,7 +1024,7 @@ namespace ArchiSteamFarm {
break;
default:
List<Task> tasks = new List<Task>(maxPages) { mainTask };
HashSet<Task> tasks = new HashSet<Task>(maxPages) { mainTask };
if (maxPages > 1) {
Bot.ArchiLogger.LogGenericInfo(Strings.CheckingOtherBadgePages);