mirror of
https://github.com/openharmony/ark_runtime_core.git
synced 2026-07-01 13:17:23 -04:00
!135 Fix gtest MathHelpers.BitAshr failure
Merge pull request !135 from wangyantian/master
This commit is contained in:
@@ -54,7 +54,7 @@ struct bit_ashr : public std::binary_function<T, T, T> { // NOLINT(readability-
|
||||
using unsigned_type = std::make_unsigned_t<T>;
|
||||
size_t mask = std::numeric_limits<unsigned_type>::digits - 1;
|
||||
size_t shift = static_cast<unsigned_type>(y) & mask;
|
||||
return static_cast<T>(static_cast<unsigned_type>(x) >> shift);
|
||||
return x >> shift; // NOLINT(hicpp-signed-bitwise)
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user