diff options
author | Pavel P <pavlov.pavel@gmail.com> | 2024-04-19 13:58:18 -0700 |
---|---|---|
committer | Copybara-Service <copybara-worker@google.com> | 2024-04-19 13:59:21 -0700 |
commit | 564372fcd6d8c76e6faca5317d94b70c1d069ddb (patch) | |
tree | 4ca22dac9d22f5914968a163a6f7bf00ddd80a41 /absl/crc | |
parent | 0908376f89f90feae0a15dba7f9b1fde9df6e3b6 (diff) |
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 9a61b00dde4031f17ed4fa4bdc0e0e9ad8859846
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
Diffstat (limited to 'absl/crc')
-rw-r--r-- | absl/crc/internal/crc_memcpy_x86_arm_combined.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/absl/crc/internal/crc_memcpy_x86_arm_combined.cc b/absl/crc/internal/crc_memcpy_x86_arm_combined.cc index 24353f2a..38f61e9b 100644 --- a/absl/crc/internal/crc_memcpy_x86_arm_combined.cc +++ b/absl/crc/internal/crc_memcpy_x86_arm_combined.cc @@ -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]; |