Commit 564372fc by Pavel P Committed by Copybara-Service

PR #1653: Remove unnecessary casts when calling CRC32_u64

Imported from GitHub PR https://github.com/abseil/abseil-cpp/pull/1653

CRC32_u64 returns uint32_t, no need to cast returned result to uint32_t

Merge 90e7b063f39c6b1559a21832d764e500e1cdd40c into 9a61b00d

Merging this change closes #1653

COPYBARA_INTEGRATE_REVIEW=https://github.com/abseil/abseil-cpp/pull/1653 from pps83:CRC32_u64-cast 90e7b063f39c6b1559a21832d764e500e1cdd40c
PiperOrigin-RevId: 626462347
Change-Id: I748a2da5fcc66eb6aa07aaf0fbc7eca927fcbb16
parent 0908376f
......@@ -130,8 +130,8 @@ ABSL_ATTRIBUTE_NO_SANITIZE_UNDEFINED inline void LargeTailCopy(
size_t data_index = i * kIntLoadsPerVec + j;
int_data[data_index] = *(usrc + j);
crcs[region] = crc32c_t{static_cast<uint32_t>(CRC32_u64(
static_cast<uint32_t>(crcs[region]), int_data[data_index]))};
crcs[region] = crc32c_t{CRC32_u64(static_cast<uint32_t>(crcs[region]),
int_data[data_index])};
*(udst + j) = int_data[data_index];
}
......@@ -299,8 +299,8 @@ AcceleratedCrcMemcpyEngine<vec_regions, int_regions>::Compute(
// Load and CRC the data.
int_data[data_index] = *(usrc + i * kIntLoadsPerVec + k);
crcs[region] = crc32c_t{static_cast<uint32_t>(CRC32_u64(
static_cast<uint32_t>(crcs[region]), int_data[data_index]))};
crcs[region] = crc32c_t{CRC32_u64(static_cast<uint32_t>(crcs[region]),
int_data[data_index])};
// Store the data.
*(udst + i * kIntLoadsPerVec + k) = int_data[data_index];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment