Replace .Where(pred).Count() with .Count(pred)
This commit is contained in:
parent
c847b8cdba
commit
03d4c51c47
|
@ -1241,7 +1241,7 @@ namespace BizHawk.Client.EmuHawk
|
||||||
int workingHeight = Screen.FromControl(this).WorkingArea.Height;
|
int workingHeight = Screen.FromControl(this).WorkingArea.Height;
|
||||||
int rowHeight = ColumnsSubMenu.Height + 4;
|
int rowHeight = ColumnsSubMenu.Height + 4;
|
||||||
int maxRows = workingHeight / rowHeight;
|
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);
|
int keysMenusCount = (int)Math.Ceiling((double)keyCount / maxRows);
|
||||||
|
|
||||||
ToolStripMenuItem[] keysMenus = new ToolStripMenuItem[keysMenusCount];
|
ToolStripMenuItem[] keysMenus = new ToolStripMenuItem[keysMenusCount];
|
||||||
|
|
Loading…
Reference in New Issue