From f6007a4b62fe287892fafefd44b25348ed1a78a3 Mon Sep 17 00:00:00 2001 From: Kang Yu Date: Thu, 12 Sep 2024 18:05:24 -0700 Subject: [PATCH] minor code simplify --- .../Common/PersistentWindowProcessor.cs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs index c3450f7..07ab40c 100644 --- a/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs +++ b/Ninjacrab.PersistentWindows.Solution/Common/PersistentWindowProcessor.cs @@ -1629,9 +1629,10 @@ namespace PersistentWindows.Common IntPtr oldest_window = IntPtr.Zero; foreach (var kid in keys) { - if (deadApps[display_config][kid].Last().CaptureTime < tm) + DateTime t = deadApps[display_config][kid].Last().CaptureTime; + if (t < tm) { - tm = deadApps[display_config][kid].Last().CaptureTime; + tm = t; oldest_window = kid; break; }