1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-12 21:34:11 +02:00

Switch some captures to '?'

This commit is contained in:
Brian Fiete 2023-03-17 08:39:05 -07:00
parent 7f695596b8
commit ac6f58f118
4 changed files with 9 additions and 9 deletions

View file

@ -315,7 +315,7 @@ namespace Beefy.widgets
focusedItem.Focused = false; focusedItem.Focused = false;
bool foundOldEnd = false; bool foundOldEnd = false;
bool foundNewHead = false; bool foundNewHead = false;
WithItems(scope [&] (checkItem) => WithItems(scope [?] (checkItem) =>
{ {
checkItem.Selected = foundNewHead ^ foundOldEnd; checkItem.Selected = foundNewHead ^ foundOldEnd;
if (checkItem == item) if (checkItem == item)

View file

@ -345,7 +345,7 @@ namespace System
public Result<void> GetValue(StringView name, List<uint8> outData) public Result<void> GetValue(StringView name, List<uint8> outData)
{ {
bool gotData = false; bool gotData = false;
GetValue(name, scope [&] (regType, regData) => GetValue(name, scope [?] (regType, regData) =>
{ {
if (regType == Windows.REG_BINARY) if (regType == Windows.REG_BINARY)
{ {
@ -361,7 +361,7 @@ namespace System
public Result<void> GetValue(StringView name, String outData) public Result<void> GetValue(StringView name, String outData)
{ {
bool gotData = false; bool gotData = false;
GetValue(name, scope [&] (regType, regData) => GetValue(name, scope [?] (regType, regData) =>
{ {
if ((regType == Windows.REG_SZ) || (regType == Windows.REG_EXPAND_SZ)) if ((regType == Windows.REG_SZ) || (regType == Windows.REG_EXPAND_SZ))
{ {

View file

@ -4415,7 +4415,7 @@ namespace IDE
Debug.Assert(true); Debug.Assert(true);
DisassemblyPanel disassemblyPanel = null; DisassemblyPanel disassemblyPanel = null;
WithTabs(scope [&] (tabButton) => WithTabs(scope [?] (tabButton) =>
{ {
if ((disassemblyPanel == null) && (tabButton.mContent is DisassemblyPanel)) if ((disassemblyPanel == null) && (tabButton.mContent is DisassemblyPanel))
{ {
@ -6188,7 +6188,7 @@ namespace IDE
public TabbedView.TabButton GetTab(Widget content) public TabbedView.TabButton GetTab(Widget content)
{ {
TabbedView.TabButton tab = null; TabbedView.TabButton tab = null;
WithTabs(scope [&] (checkTab) => WithTabs(scope [?] (checkTab) =>
{ {
if (checkTab.mContent == content) if (checkTab.mContent == content)
tab = checkTab; tab = checkTab;
@ -7092,7 +7092,7 @@ namespace IDE
DarkTabbedView tabbedView = null; DarkTabbedView tabbedView = null;
DarkTabbedView.DarkTabButton tabButton = null; DarkTabbedView.DarkTabButton tabButton = null;
WithTabs(scope [&] (tab) => WithTabs(scope [?] (tab) =>
{ {
if (tab.mContent == documentPanel) if (tab.mContent == documentPanel)
{ {
@ -9278,7 +9278,7 @@ namespace IDE
{ {
String text = scope String(); String text = scope String();
bool isValid = false; 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); mFileWatcher.FileIsValid(fullPath);
isValid = true; isValid = true;

View file

@ -1577,7 +1577,7 @@ namespace IDE
UpdateWatches(); UpdateWatches();
int foundIdx = 0; int foundIdx = 0;
gApp.mWatchPanel.mListView.GetRoot().WithItems(scope [&] (item) => gApp.mWatchPanel.mListView.GetRoot().WithItems(scope [?] (item) =>
{ {
if (item.mLabel == str) if (item.mLabel == str)
{ {
@ -1615,7 +1615,7 @@ namespace IDE
UpdateWatches(); UpdateWatches();
int foundIdx = 0; int foundIdx = 0;
gApp.mWatchPanel.mListView.GetRoot().WithItems(scope [&] (item) => gApp.mWatchPanel.mListView.GetRoot().WithItems(scope [?] (item) =>
{ {
let watchItem = (WatchListViewItem)item; let watchItem = (WatchListViewItem)item;
if (watchItem.Selected) if (watchItem.Selected)