summaryrefslogtreecommitdiff
path: root/src/amount.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2009-01-30 16:19:31 -0400
committerJohn Wiegley <johnw@newartisans.com>2009-01-30 16:19:31 -0400
commitf1257cbc3eaddc075dcb4f9ebff17e4ea416c4ed (patch)
treeee13fa7f7e046735b8a267bef0a3525ccb343b12 /src/amount.cc
parent94004358705b8fbfbb3b18226804820b1dca565e (diff)
downloadledger-f1257cbc3eaddc075dcb4f9ebff17e4ea416c4ed.tar.gz
ledger-f1257cbc3eaddc075dcb4f9ebff17e4ea416c4ed.tar.bz2
ledger-f1257cbc3eaddc075dcb4f9ebff17e4ea416c4ed.zip
Removed all dependency on gdtoa.
Diffstat (limited to 'src/amount.cc')
-rw-r--r--src/amount.cc12
1 files changed, 0 insertions, 12 deletions
diff --git a/src/amount.cc b/src/amount.cc
index d7a689cc..55a71521 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -223,8 +223,6 @@ void amount_t::_release()
}
-#ifdef HAVE_GDTOA
-
namespace {
amount_t::precision_t convert_double(mpz_t dest, double val)
{
@@ -277,8 +275,6 @@ amount_t::amount_t(const double val) : commodity_(NULL)
quantity->prec = convert_double(MPZ(quantity), val);
}
-#endif // HAVE_GDTOA
-
amount_t::amount_t(const unsigned long val) : commodity_(NULL)
{
TRACE_CTOR(amount_t, "const unsigned long");
@@ -683,8 +679,6 @@ bool amount_t::is_zero() const
}
-#ifdef HAVE_GDTOA
-
double amount_t::to_double(bool no_check) const
{
if (! quantity)
@@ -716,8 +710,6 @@ double amount_t::to_double(bool no_check) const
return value;
}
-#endif // HAVE_GDTOA
-
long amount_t::to_long(bool no_check) const
{
if (! quantity)
@@ -735,16 +727,12 @@ long amount_t::to_long(bool no_check) const
return value;
}
-#ifdef HAVE_GDTOA
-
bool amount_t::fits_in_double() const
{
double value = to_double(true);
return *this == amount_t(value);
}
-#endif // HAVE_GDTOA
-
bool amount_t::fits_in_long() const
{
long value = to_long(true);