From ff398dbf0c61c1ccf1eda21cd285ea683d1055f2 Mon Sep 17 00:00:00 2001 From: Lucas De Marchi Date: Sun, 24 May 2015 07:41:02 -0300 Subject: [PATCH] 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. --- libraries/AP_Menu/AP_Menu.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/AP_Menu/AP_Menu.cpp b/libraries/AP_Menu/AP_Menu.cpp index 447aa07e27..6085c62438 100644 --- a/libraries/AP_Menu/AP_Menu.cpp +++ b/libraries/AP_Menu/AP_Menu.cpp @@ -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();