Skip to content

Commit 1323a01

Browse files
committed
Adjust guard for LifespanQosPolicy
Signed-off-by: Andrea Sorbini <[email protected]>
1 parent 47224b2 commit 1323a01

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

rmw_connextdds_common/src/common/rmw_impl.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -427,16 +427,15 @@ rmw_connextdds_get_readerwriter_qos(
427427
// Micro does not support this policy, so the value will always be NULL.
428428
#if RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_MICRO
429429
assert(nullptr == lifespan);
430-
#endif /* RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_MICRO */
430+
#else /* RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO */
431431
if (lifespan != nullptr &&
432432
!rmw_time_equal(qos_policies->lifespan, RMW_DURATION_UNSPECIFIED))
433433
{
434434
// Guard access to type since it's not defined by Micro (only forward declared
435435
// by rmw_connextdds/dds_api_rtime.hpp)
436-
#if RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO
437436
lifespan->duration = rmw_time_to_dds_duration(qos_policies->lifespan);
438-
#endif /* RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO */
439437
}
438+
#endif /* RMW_CONNEXT_DDS_API == RMW_CONNEXT_DDS_API_PRO */
440439

441440
return RMW_RET_OK;
442441
}

0 commit comments

Comments
 (0)