Remove useless test

Coverity issue 23300.
This commit is contained in:
Jean-Marc 2015-09-12 19:53:29 +02:00
parent 28e997781d
commit d786d98c36

View File

@ -1122,12 +1122,10 @@ void MenuDefinition::expandFormats(MenuItem::Kind const kind, Buffer const * buf
label += '|' + shortcut; label += '|' + shortcut;
if (view_update) { if (view_update) {
if (buf) // note that at this point, we know that buf is not null
item.submenu().addWithStatusCheck(MenuItem(MenuItem::Command, LATTEST(buf);
toqstr(label), FuncRequest(action, (*fit)->name()))); item.submenu().addWithStatusCheck(MenuItem(MenuItem::Command,
else toqstr(label), FuncRequest(action, (*fit)->name())));
item.submenu().add(MenuItem(MenuItem::Command, toqstr(label),
FuncRequest(action, (*fit)->name())));
} else { } else {
if (buf) if (buf)
addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(label), addWithStatusCheck(MenuItem(MenuItem::Command, toqstr(label),