Change try..finally to more compact scope(exit)

This commit is contained in:
and3md 2017-03-23 18:16:44 +01:00
parent cd1cc7c1f6
commit fa2cddad34
1 changed files with 2 additions and 8 deletions

View File

@ -498,14 +498,8 @@ class RadioButton : ImageTextButton {
RadioButton rb = cast(RadioButton)child;
if (rb) {
rb.blockUnchecking = true;
try
{
rb.checked = false;
}
finally
{
rb.blockUnchecking = false;
}
scope(exit) rb.blockUnchecking = false;
rb.checked = false;
}
}
}