Address some AI review feedback: predeclare, include, format, comment

- Predeclare type reference in Rules.h
- Remove an unneeded include in EscrowToken_test
- Number_test will format negative BigInts correctly (unused)
- Remove an inaccurate comment
This commit is contained in:
Ed Hennis
2026-05-26 13:45:55 -04:00
parent 75dfc65f5f
commit 84ca271d95
3 changed files with 2 additions and 3 deletions

View File

@@ -123,6 +123,7 @@ private:
};
class NumberSO;
class NumberMantissaScaleGuard;
bool
useRulesGuards(Rules const& rules);

View File

@@ -28,7 +28,6 @@
#include <xrpl/protocol/Issue.h>
#include <xrpl/protocol/MPTIssue.h>
#include <xrpl/protocol/Protocol.h>
#include <xrpl/protocol/Rules.h>
#include <xrpl/protocol/SField.h>
#include <xrpl/protocol/STAmount.h>
#include <xrpl/protocol/TER.h>

View File

@@ -31,7 +31,7 @@ class Number_test : public beast::unit_test::Suite
int count = 0;
for (auto it = s.rbegin(); it != s.rend(); ++it)
{
if (count != 0 && count % 3 == 0)
if (count != 0 && count % 3 == 0 && isdigit(*it))
out.insert(out.begin(), '_');
out.insert(out.begin(), *it);
++count;
@@ -1596,7 +1596,6 @@ public:
constexpr std::int64_t kAValue = 1'000'000'000'000'049'863LL;
constexpr std::int64_t kBValue = 9'223'372'036'854'315'903LL;
// Public conversion operator: STAmount::operator Number() const.
Number const a = kAValue;
Number const b = kBValue;
Number const product = a * b;