Correct std::hash return type sizes (#102)
Signed-off-by: Michael Carroll <michael@openrobotics.org>
This commit is contained in:
parent
275d3dd42a
commit
7d4e17224a
1 changed files with 4 additions and 2 deletions
|
@ -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<const struct sertopic_rmw *>(tpcmn);
|
||||
uint32_t h2 = std::hash<bool>{} (tp->is_request_header);
|
||||
uint32_t h1 = std::hash<std::string>{} (std::string(tp->type_support.typesupport_identifier_));
|
||||
uint32_t h2 = static_cast<uint32_t>(std::hash<bool>{} (tp->is_request_header));
|
||||
uint32_t h1 =
|
||||
static_cast<uint32_t>(std::hash<std::string>{} (std::string(
|
||||
tp->type_support.typesupport_identifier_)));
|
||||
return h1 ^ h2;
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue