mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 08:53:35 +08:00
try_implicit_cast<>() --> coerceOrFallback<>()
This commit is contained in:
@@ -127,7 +127,7 @@ private:
|
||||
|
||||
ServiceResponseDataStructure<ResponseType> response;
|
||||
|
||||
if (try_implicit_cast<bool>(callback_, true))
|
||||
if (coerceOrFallback<bool>(callback_, true))
|
||||
{
|
||||
UAVCAN_ASSERT(response.isResponseEnabled()); // Enabled by default
|
||||
callback_(request, response);
|
||||
@@ -174,7 +174,7 @@ public:
|
||||
{
|
||||
stop();
|
||||
|
||||
if (!try_implicit_cast<bool>(callback, true))
|
||||
if (!coerceOrFallback<bool>(callback, true))
|
||||
{
|
||||
UAVCAN_TRACE("ServiceServer", "Invalid callback");
|
||||
return -ErrInvalidParam;
|
||||
|
||||
Reference in New Issue
Block a user