Skip to content

Commit

Permalink
Supress conversion warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
osubboo committed Oct 30, 2024
1 parent e84a9dd commit 7b3614c
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions groups/bal/ball/ball_attribute.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<int>(string.size()));
}

/// Return the hash value for the specified `guid`.
Expand Down Expand Up @@ -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<unsigned int>(ValueHashVisitor());
bdlb::HashUtil::hash1(attribute.d_name.data(),
static_cast<int>(
bsl::ssize(attribute.d_name))) +
attribute.d_value.applyRaw<unsigned int>(ValueHashVisitor());

attribute.d_hashValue = hash % size;
attribute.d_hashSize = size;
Expand Down

0 comments on commit 7b3614c

Please sign in to comment.