Browse Source

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.
master
Lucas De Marchi 10 years ago committed by Andrew Tridgell
parent
commit
ff398dbf0c
  1. 2
      libraries/AP_Menu/AP_Menu.cpp

2
libraries/AP_Menu/AP_Menu.cpp

@ -181,7 +181,7 @@ Menu::run(void) @@ -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();

Loading…
Cancel
Save