From 7b3614ced036c3986e78a4ce5eb521fbd3160b4b Mon Sep 17 00:00:00 2001 From: Oleg Subbotin Date: Wed, 30 Oct 2024 13:27:52 -0400 Subject: [PATCH] Supress conversion warnings --- groups/bal/ball/ball_attribute.cpp | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/groups/bal/ball/ball_attribute.cpp b/groups/bal/ball/ball_attribute.cpp index 56f6e189e0..9c912115af 100644 --- a/groups/bal/ball/ball_attribute.cpp +++ b/groups/bal/ball/ball_attribute.cpp @@ -23,7 +23,8 @@ struct ValueHashVisitor { /// Return the hash value for the specified `string`. unsigned int operator()(const bsl::string& string) const { - return bdlb::HashUtil::hash1(string.data(), string.size()); + return bdlb::HashUtil::hash1(string.data(), + static_cast(string.size())); } /// Return the hash value for the specified `guid`. @@ -58,9 +59,10 @@ int Attribute::hash(const Attribute& attribute, int size) if (attribute.d_hashValue < 0 || attribute.d_hashSize != size) { const unsigned int hash = - bdlb::HashUtil::hash1(attribute.d_name.data(), - bsl::ssize(attribute.d_name)) + - attribute.d_value.applyRaw(ValueHashVisitor()); + bdlb::HashUtil::hash1(attribute.d_name.data(), + static_cast( + bsl::ssize(attribute.d_name))) + + attribute.d_value.applyRaw(ValueHashVisitor()); attribute.d_hashValue = hash % size; attribute.d_hashSize = size;