diff --git a/rmw_cyclonedds_cpp/src/serdata.cpp b/rmw_cyclonedds_cpp/src/serdata.cpp index db3f78330d..c6d9b5f4ee 100644 --- a/rmw_cyclonedds_cpp/src/serdata.cpp +++ b/rmw_cyclonedds_cpp/src/serdata.cpp @@ -465,8 +465,10 @@ bool sertopic_rmw_equal( uint32_t sertopic_rmw_hash(const struct ddsi_sertopic * tpcmn) { const struct sertopic_rmw * tp = static_cast(tpcmn); - uint32_t h2 = std::hash{} (tp->is_request_header); - uint32_t h1 = std::hash{} (std::string(tp->type_support.typesupport_identifier_)); + uint32_t h2 = static_cast(std::hash{} (tp->is_request_header)); + uint32_t h1 = + static_cast(std::hash{} (std::string( + tp->type_support.typesupport_identifier_))); return h1 ^ h2; } #endif