From b30a70bbf85c6623a7ed7ba93955999a0cfe3469 Mon Sep 17 00:00:00 2001 From: Ed Hennis Date: Fri, 12 Jun 2026 18:44:00 -0400 Subject: [PATCH] Apply suggestions from AI code review Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- include/xrpl/basics/Number.h | 2 +- src/libxrpl/basics/Number.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/xrpl/basics/Number.h b/include/xrpl/basics/Number.h index ccd448887a..0604fb2d55 100644 --- a/include/xrpl/basics/Number.h +++ b/include/xrpl/basics/Number.h @@ -52,7 +52,7 @@ namespace detail { * inefficient. */ constexpr std::size_t kUint64Digits = 20; -constexpr std::size_t kUint128Digits = 39; +[[maybe_unused]] constexpr std::size_t kUint128Digits = 39; template consteval std::array diff --git a/src/libxrpl/basics/Number.cpp b/src/libxrpl/basics/Number.cpp index aa0d3e8fd6..0de4daaf9a 100644 --- a/src/libxrpl/basics/Number.cpp +++ b/src/libxrpl/basics/Number.cpp @@ -212,7 +212,7 @@ concept UnsignedMantissa = std::is_unsigned_v || std::is_same_v precision to an operation. This enables the final result to be correctly rounded to the internal precision of Number. - At it's core, the Guard really only needs three pieces of information to determine how to round: + At its core, the Guard really only needs three pieces of information to determine how to round: 1. The rounding mode 2. The last digit dropped from the mantissa (i.e. the first digit after the decimal point). (first byte of digits_) @@ -298,7 +298,7 @@ public: // The result is exact. No rounding is needed. Only used if cuspRoundingFix is Enabled. Exact = -2, // Round down. Since we use integer math, that usually means no change is needed. - // Exceptions are for when the result is between kMaxRap and kMaxRepUp (round to kMaxRep), + // Exceptions are for when the result is between kMaxRep and kMaxRepUp (round to kMaxRep), // or after subtraction where _any_ remainder will modify the result. The latter is what // distinguishes Exact from Down. Down = -1,