[libc-commits] [libc] 25d50a0 - [libc][Obvious] Fix a mismatch signature of HighPrecisionDecimal::should_round_up.
Tue Ly via libc-commits
libc-commits at lists.llvm.org
Thu Feb 3 19:36:20 PST 2022
Author: Tue Ly
Date: 2022-02-03T22:36:03-05:00
New Revision: 25d50a00c5f81196d98613169179aed58653d8bf
URL: https://github.com/llvm/llvm-project/commit/25d50a00c5f81196d98613169179aed58653d8bf
DIFF: https://github.com/llvm/llvm-project/commit/25d50a00c5f81196d98613169179aed58653d8bf.diff
LOG: [libc][Obvious] Fix a mismatch signature of HighPrecisionDecimal::should_round_up.
Its input should be int32_t instead of uint32_t.
Reviewed By: michaelrj, sivachandra
Differential Revision: https://reviews.llvm.org/D118791
Added:
Modified:
libc/src/__support/high_precision_decimal.h
Removed:
################################################################################
diff --git a/libc/src/__support/high_precision_decimal.h b/libc/src/__support/high_precision_decimal.h
index 00ccd7078c198..1b941da212aa1 100644
--- a/libc/src/__support/high_precision_decimal.h
+++ b/libc/src/__support/high_precision_decimal.h
@@ -111,7 +111,7 @@ class HighPrecisionDecimal {
uint8_t digits[MAX_NUM_DIGITS];
private:
- bool should_round_up(uint32_t roundToDigit) {
+ bool should_round_up(int32_t roundToDigit) {
if (roundToDigit < 0 || roundToDigit >= this->num_digits) {
return false;
}
More information about the libc-commits
mailing list