mirror of
https://github.com/XRPLF/rippled.git
synced 2025-12-06 17:27:55 +00:00
Mostly cosmetic.
This commit is contained in:
@@ -12,6 +12,7 @@
|
||||
#define SYSTEM_NAME "newcoin"
|
||||
#define SYSTEM_CURRENCY_CODE "XNS"
|
||||
#define SYSTEM_CURRENCY_PRECISION 6
|
||||
#define SYSTEM_CURRENCY_CODE_RIPPLE "XNR"
|
||||
|
||||
#define SYSTEM_CURRENCY_GIFT 1000ull
|
||||
#define SYSTEM_CURRENCY_USERS 100000000ull
|
||||
|
||||
@@ -15,9 +15,7 @@ RippleState::RippleState(SerializedLedgerEntry::pointer ledgerEntry) :
|
||||
|
||||
mBalance = mLedgerEntry->getIValueFieldAmount(sfBalance);
|
||||
|
||||
// YYY Should never fail.
|
||||
if (mLowID.isValid() && mHighID.isValid())
|
||||
mValid = true;
|
||||
mValid = true;
|
||||
}
|
||||
|
||||
void RippleState::setViewAccount(const NewcoinAddress& naView)
|
||||
@@ -27,7 +25,7 @@ void RippleState::setViewAccount(const NewcoinAddress& naView)
|
||||
if (bViewLowestNew != mViewLowest)
|
||||
{
|
||||
mViewLowest = bViewLowestNew;
|
||||
mBalance.changeSign();
|
||||
mBalance.negate();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -206,10 +206,12 @@ class STAmount : public SerializedType
|
||||
// Low 56 bits are value, legal range is 10^15 to (10^16 - 1) inclusive
|
||||
|
||||
protected:
|
||||
uint160 mCurrency;
|
||||
uint64 mValue;
|
||||
int mOffset;
|
||||
bool mIsNative, mIsNegative;
|
||||
uint160 mCurrency;
|
||||
|
||||
uint64 mValue;
|
||||
int mOffset;
|
||||
bool mIsNative; // True for native stamps, ripple stamps are not native.
|
||||
bool mIsNegative;
|
||||
|
||||
void canonicalize();
|
||||
STAmount* duplicate() const { return new STAmount(*this); }
|
||||
@@ -277,7 +279,7 @@ public:
|
||||
bool isGEZero() const { return !mIsNegative; }
|
||||
operator bool() const { return !isZero(); }
|
||||
|
||||
void changeSign() { if (!isZero()) mIsNegative = !mIsNegative; }
|
||||
void negate() { if (!isZero()) mIsNegative = !mIsNegative; }
|
||||
void zero() { mOffset = mIsNative ? -100 : 0; mValue = 0; mIsNegative = false; }
|
||||
|
||||
const uint160& getCurrency() const { return mCurrency; }
|
||||
|
||||
Reference in New Issue
Block a user