AP_Menu: Do not compare delegate to NULL

Use the simpler "if (delegate_name)" since it allows simpler
implementation in the class, i.e. the bool operator rather than having
to compare to another object.
This commit is contained in:
Lucas De Marchi 2015-05-24 07:41:02 -03:00 committed by Andrew Tridgell
parent acdcdc35fa
commit ff398dbf0c
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ Menu::run(void)
for (;;) {
// run the pre-prompt function, if one is defined
if (NULL != _ppfunc) {
if (_ppfunc) {
if (!_ppfunc())
return;
_display_prompt();