mirror of
https://github.com/XRPLF/rippled.git
synced 2025-11-21 11:35:53 +00:00
Add IOUAmount and XRPAmount (RIPD-976):
These numeric types replace the monolithic functionality found in STAmount. They are not used yet.
This commit is contained in:
committed by
Vinnie Falco
parent
edc1bc35fd
commit
59431c513a
@@ -18,6 +18,8 @@
|
||||
//==============================================================================
|
||||
|
||||
#include <BeastConfig.h>
|
||||
|
||||
#include <ripple/basics/contract.h>
|
||||
#include <ripple/basics/Log.h>
|
||||
#include <ripple/protocol/JsonFields.h>
|
||||
#include <ripple/crypto/CBigNum.h>
|
||||
@@ -621,7 +623,9 @@ void STAmount::canonicalize ()
|
||||
if ((mOffset < cMinOffset) || (mValue < cMinValue))
|
||||
{
|
||||
mValue = 0;
|
||||
mOffset = 0;
|
||||
mIsNegative = false;
|
||||
mOffset = -100;
|
||||
return;
|
||||
}
|
||||
|
||||
if (mOffset > cMaxOffset)
|
||||
@@ -913,7 +917,6 @@ operator- (STAmount const& value)
|
||||
// Arithmetic
|
||||
//
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
STAmount
|
||||
divide (STAmount const& num, STAmount const& den, Issue const& issue)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user