AP_HAL: functor: add != override

This commit is contained in:
Peter Barker 2018-07-09 11:19:09 +10:00 committed by Randy Mackay
parent a09154c45b
commit c846a13d12

View File

@ -60,6 +60,10 @@ public:
{ {
return _obj == rhs._obj && _method == rhs._method; return _obj == rhs._obj && _method == rhs._method;
} }
inline bool operator!=(const Functor<RetType, Args...>& rhs)
{
return _obj != rhs._obj || _method != rhs._method;
}
// Allow to check if there's a method set in the Functor // Allow to check if there's a method set in the Functor
explicit operator bool() const explicit operator bool() const