Skip to content

Commit

Permalink
[#15] Fix GCC build
Browse files Browse the repository at this point in the history
  • Loading branch information
orecham committed Dec 19, 2024
1 parent b0577b5 commit 97005d3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions rmw_iceoryx2_cxx/include/rmw_iceoryx2_cxx/iox2/iceoryx2.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -142,15 +142,15 @@ class RMW_PUBLIC Iceoryx2

// ===================================================================================================================

template <::iox2::ServiceType ServiceType>
auto Iceoryx2::service_builder(const std::string& service_name) -> ::iox2::ServiceBuilder<ServiceType> {
template <::iox2::ServiceType S>
auto Iceoryx2::service_builder(const std::string& service_name) -> ::iox2::ServiceBuilder<S> {
auto name = ::iox2::ServiceName::create(service_name.c_str());
if (name.has_error()) {
// TODO: propagate error
}
if constexpr (ServiceType == ::iox2::ServiceType::Local) {
if constexpr (S == ::iox2::ServiceType::Local) {
return local().service_builder(name.value());
} else if constexpr (ServiceType == ::iox2::ServiceType::Ipc) {
} else if constexpr (S == ::iox2::ServiceType::Ipc) {
return ipc().service_builder(name.value());
} else {
static_assert(std::false_type::value, "Attempted to build a service of unknown type");
Expand Down
4 changes: 2 additions & 2 deletions rmw_iceoryx2_cxx/src/rmw/graph.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ rmw_ret_t rmw_get_publishers_info_by_topic(const rmw_node_t* node,
if (!rcutils_allocator_is_valid(allocator)) {
return RMW_RET_INVALID_ARGUMENT;
}
if (auto result = rmw_topic_endpoint_info_array_check_zero(publishers_info) != RMW_RET_OK) {
if (rmw_topic_endpoint_info_array_check_zero(publishers_info) != RMW_RET_OK) {
return RMW_RET_INVALID_ARGUMENT;
}

Expand Down Expand Up @@ -443,7 +443,7 @@ rmw_ret_t rmw_get_subscriptions_info_by_topic(const rmw_node_t* node,
if (!rcutils_allocator_is_valid(allocator)) {
return RMW_RET_INVALID_ARGUMENT;
}
if (auto result = rmw_topic_endpoint_info_array_check_zero(subscriptions_info) != RMW_RET_OK) {
if (rmw_topic_endpoint_info_array_check_zero(subscriptions_info) != RMW_RET_OK) {
return RMW_RET_INVALID_ARGUMENT;
}

Expand Down

0 comments on commit 97005d3

Please sign in to comment.