From 564372fcd6d8c76e6faca5317d94b70c1d069ddb Mon Sep 17 00:00:00 2001 From: Pavel P Date: Fri, 19 Apr 2024 13:58:18 -0700 Subject: 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 --- absl/crc/internal/crc_memcpy_x86_arm_combined.cc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'absl') 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(CRC32_u64( - static_cast(crcs[region]), int_data[data_index]))}; + crcs[region] = crc32c_t{CRC32_u64(static_cast(crcs[region]), + int_data[data_index])}; *(udst + j) = int_data[data_index]; } @@ -299,8 +299,8 @@ AcceleratedCrcMemcpyEngine::Compute( // Load and CRC the data. int_data[data_index] = *(usrc + i * kIntLoadsPerVec + k); - crcs[region] = crc32c_t{static_cast(CRC32_u64( - static_cast(crcs[region]), int_data[data_index]))}; + crcs[region] = crc32c_t{CRC32_u64(static_cast(crcs[region]), + int_data[data_index])}; // Store the data. *(udst + i * kIntLoadsPerVec + k) = int_data[data_index]; -- cgit v1.2.3