Replace .Where(pred).Count() with .Count(pred)

This commit is contained in:
YoshiRulz 2019-03-27 14:40:55 +10:00
parent c847b8cdba
commit 03d4c51c47
No known key found for this signature in database
GPG Key ID: C4DE31C245353FB7
1 changed files with 1 additions and 1 deletions

View File

@ -1241,7 +1241,7 @@ namespace BizHawk.Client.EmuHawk
int workingHeight = Screen.FromControl(this).WorkingArea.Height;
int rowHeight = ColumnsSubMenu.Height + 4;
int maxRows = workingHeight / rowHeight;
int keyCount = columns.Where(c => c.Name.StartsWith("Key ")).Count();
int keyCount = columns.Count(c => c.Name.StartsWith("Key "));
int keysMenusCount = (int)Math.Ceiling((double)keyCount / maxRows);
ToolStripMenuItem[] keysMenus = new ToolStripMenuItem[keysMenusCount];