diff options
author | John Wiegley <johnw@newartisans.com> | 2012-05-19 19:32:40 -0500 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-05-20 04:48:05 -0500 |
commit | 4681e58d7f3cda2a2ac6d05b6ec1a106f568e029 (patch) | |
tree | 488d6531d688c68713baa5c1d70fb37be198b861 /src/amount.cc | |
parent | 303976e563608d8a1f4eb09ac5c9402ae5ce74fd (diff) | |
download | fork-ledger-4681e58d7f3cda2a2ac6d05b6ec1a106f568e029.tar.gz fork-ledger-4681e58d7f3cda2a2ac6d05b6ec1a106f568e029.tar.bz2 fork-ledger-4681e58d7f3cda2a2ac6d05b6ec1a106f568e029.zip |
Converted the Ledger build system to use CMake
Diffstat (limited to 'src/amount.cc')
-rw-r--r-- | src/amount.cc | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/amount.cc b/src/amount.cc index 645b244b..9491efcd 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -93,7 +93,7 @@ struct amount_t::bigint_t : public supports_flags<> return true; } -#if defined(HAVE_BOOST_SERIALIZATION) +#if HAVE_BOOST_SERIALIZATION private: friend class boost::serialization::access; @@ -120,7 +120,7 @@ namespace { { char * buf = NULL; try { -#if defined(DEBUG_ON) +#if DEBUG_ON IF_DEBUG("amount.convert") { char * tbuf = mpq_get_str(NULL, 10, quant); DEBUG("amount.convert", "Rational to convert = " << tbuf); @@ -247,7 +247,7 @@ void amount_t::initialize() // in terms of seconds, but reported as minutes or hours. if (commodity_t * commodity = commodity_pool_t::current_pool->create("s")) commodity->add_flags(COMMODITY_BUILTIN | COMMODITY_NOMARKET); -#if !defined(NO_ASSERTS) +#if !NO_ASSERTS else assert(false); #endif @@ -255,7 +255,7 @@ void amount_t::initialize() // Add a "percentile" commodity if (commodity_t * commodity = commodity_pool_t::current_pool->create("%")) commodity->add_flags(COMMODITY_BUILTIN | COMMODITY_NOMARKET); -#if !defined(NO_ASSERTS) +#if !NO_ASSERTS else assert(false); #endif @@ -730,7 +730,7 @@ amount_t::value(const datetime_t& moment, const commodity_t * in_terms_of) const { if (quantity) { -#if defined(DEBUG_ON) +#if DEBUG_ON DEBUG("commodity.price.find", "amount_t::value of " << commodity().symbol()); if (! moment.is_not_a_date_time()) @@ -1294,7 +1294,7 @@ void put_amount(property_tree::ptree& pt, const amount_t& amt, st.put("quantity", amt.quantity_string()); } -#if defined(HAVE_BOOST_SERIALIZATION) +#if HAVE_BOOST_SERIALIZATION template<class Archive> void amount_t::serialize(Archive& ar, const unsigned int /* version */) @@ -1308,7 +1308,7 @@ void amount_t::serialize(Archive& ar, const unsigned int /* version */) } // namespace ledger -#if defined(HAVE_BOOST_SERIALIZATION) +#if HAVE_BOOST_SERIALIZATION namespace boost { namespace serialization { |