From ac6f58f1186f083c07b35a4ce30aef11d8f2ba27 Mon Sep 17 00:00:00 2001 From: Brian Fiete Date: Fri, 17 Mar 2023 08:39:05 -0700 Subject: [PATCH] Switch some captures to '?' --- BeefLibs/Beefy2D/src/widgets/ListView.bf | 2 +- BeefLibs/corlib/src/Windows.bf | 4 ++-- IDE/src/IDEApp.bf | 8 ++++---- IDE/src/ScriptManager.bf | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/BeefLibs/Beefy2D/src/widgets/ListView.bf b/BeefLibs/Beefy2D/src/widgets/ListView.bf index 7de9217b..dcee43a9 100644 --- a/BeefLibs/Beefy2D/src/widgets/ListView.bf +++ b/BeefLibs/Beefy2D/src/widgets/ListView.bf @@ -315,7 +315,7 @@ namespace Beefy.widgets focusedItem.Focused = false; bool foundOldEnd = false; bool foundNewHead = false; - WithItems(scope [&] (checkItem) => + WithItems(scope [?] (checkItem) => { checkItem.Selected = foundNewHead ^ foundOldEnd; if (checkItem == item) diff --git a/BeefLibs/corlib/src/Windows.bf b/BeefLibs/corlib/src/Windows.bf index 7a3a135c..7991aa2a 100644 --- a/BeefLibs/corlib/src/Windows.bf +++ b/BeefLibs/corlib/src/Windows.bf @@ -345,7 +345,7 @@ namespace System public Result GetValue(StringView name, List outData) { bool gotData = false; - GetValue(name, scope [&] (regType, regData) => + GetValue(name, scope [?] (regType, regData) => { if (regType == Windows.REG_BINARY) { @@ -361,7 +361,7 @@ namespace System public Result GetValue(StringView name, String outData) { bool gotData = false; - GetValue(name, scope [&] (regType, regData) => + GetValue(name, scope [?] (regType, regData) => { if ((regType == Windows.REG_SZ) || (regType == Windows.REG_EXPAND_SZ)) { diff --git a/IDE/src/IDEApp.bf b/IDE/src/IDEApp.bf index 2d9f4726..b206882f 100644 --- a/IDE/src/IDEApp.bf +++ b/IDE/src/IDEApp.bf @@ -4415,7 +4415,7 @@ namespace IDE Debug.Assert(true); DisassemblyPanel disassemblyPanel = null; - WithTabs(scope [&] (tabButton) => + WithTabs(scope [?] (tabButton) => { if ((disassemblyPanel == null) && (tabButton.mContent is DisassemblyPanel)) { @@ -6188,7 +6188,7 @@ namespace IDE public TabbedView.TabButton GetTab(Widget content) { TabbedView.TabButton tab = null; - WithTabs(scope [&] (checkTab) => + WithTabs(scope [?] (checkTab) => { if (checkTab.mContent == content) tab = checkTab; @@ -7092,7 +7092,7 @@ namespace IDE DarkTabbedView tabbedView = null; DarkTabbedView.DarkTabButton tabButton = null; - WithTabs(scope [&] (tab) => + WithTabs(scope [?] (tab) => { if (tab.mContent == documentPanel) { @@ -9278,7 +9278,7 @@ namespace IDE { String text = scope String(); bool isValid = false; - if (LoadTextFile(fullPath, text, true, scope [&] () => { if (sourceHash != null) *sourceHash = SourceHash.Create(.MD5, text); } ) case .Ok) + if (LoadTextFile(fullPath, text, true, scope [?] () => { if (sourceHash != null) *sourceHash = SourceHash.Create(.MD5, text); } ) case .Ok) { mFileWatcher.FileIsValid(fullPath); isValid = true; diff --git a/IDE/src/ScriptManager.bf b/IDE/src/ScriptManager.bf index 34f78b75..eeafdc84 100644 --- a/IDE/src/ScriptManager.bf +++ b/IDE/src/ScriptManager.bf @@ -1577,7 +1577,7 @@ namespace IDE UpdateWatches(); int foundIdx = 0; - gApp.mWatchPanel.mListView.GetRoot().WithItems(scope [&] (item) => + gApp.mWatchPanel.mListView.GetRoot().WithItems(scope [?] (item) => { if (item.mLabel == str) { @@ -1615,7 +1615,7 @@ namespace IDE UpdateWatches(); int foundIdx = 0; - gApp.mWatchPanel.mListView.GetRoot().WithItems(scope [&] (item) => + gApp.mWatchPanel.mListView.GetRoot().WithItems(scope [?] (item) => { let watchItem = (WatchListViewItem)item; if (watchItem.Selected)