Remove yoda conditions

part of refactoring for PR #494
This commit is contained in:
bao-qian
2016-02-22 21:47:10 +00:00
parent 43bfeff2be
commit e2338fcedf
5 changed files with 16 additions and 26 deletions

View File

@@ -287,7 +287,7 @@ namespace Wox.ViewModel
ShiftEnterCommand = new RelayCommand(_ =>
{
if (!IsContextMenuVisible && null != Results.SelectedResult)
if (!IsContextMenuVisible && Results.SelectedResult != null)
{
ShowContextMenu(Results.SelectedResult.RawResult);
}
@@ -295,7 +295,7 @@ namespace Wox.ViewModel
OpenResultCommand = new RelayCommand(o =>
{
if (null != o)
if (o != null)
{
var index = int.Parse(o.ToString());
Results.SelectResult(index);