Skip to content

Commit

Permalink
Conditional attribute cannot be used on functions returning non-void
Browse files Browse the repository at this point in the history
  • Loading branch information
nemerle committed Nov 28, 2015
1 parent 476314d commit be55535
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Gui/Windows/DecompilerUiService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ public bool Prompt(string prompt)
() => { dlgr = MessageBox.Show(prompt, "Reko Decompiler", MessageBoxButtons.YesNo, MessageBoxIcon.Question); }));
return dlgr == DialogResult.Yes;
}

[Conditional("DEBUG")]
#if DEBUG
private Thread GetControlOwnerThread(Control ctrl)
{
if (ctrl.InvokeRequired)
return (Thread)ctrl.Invoke(new Func<Thread>(() => GetControlOwnerThread(ctrl)));
else
return System.Threading.Thread.CurrentThread;
}
#endif
private DialogResult ShowModalDialog(Form dlg)
{
var ownthr = GetControlOwnerThread(dlg);
Expand Down

0 comments on commit be55535

Please sign in to comment.