summaryrefslogtreecommitdiff
path: root/src/amount.cc
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2015-02-15 08:39:58 +0100
committerAlexis Hildebrandt <afh@surryhill.net>2015-02-18 21:50:34 +0100
commitd5e1308d07e9a7d9da33aed6f7f617b2209cba40 (patch)
treeef98ba33a55d64aee61d29a3f25232d20dbb2d20 /src/amount.cc
parentf59abd4c765b08cbd5f18ec851b1d78a766a1c93 (diff)
downloadfork-ledger-d5e1308d07e9a7d9da33aed6f7f617b2209cba40.tar.gz
fork-ledger-d5e1308d07e9a7d9da33aed6f7f617b2209cba40.tar.bz2
fork-ledger-d5e1308d07e9a7d9da33aed6f7f617b2209cba40.zip
[ledger] Remove --cache option
and all boost serialisation related code.
Diffstat (limited to 'src/amount.cc')
-rw-r--r--src/amount.cc79
1 files changed, 0 insertions, 79 deletions
diff --git a/src/amount.cc b/src/amount.cc
index 6ddcdb4f..b0898bfb 100644
--- a/src/amount.cc
+++ b/src/amount.cc
@@ -93,20 +93,6 @@ struct amount_t::bigint_t : public supports_flags<>
}
return true;
}
-
-#if HAVE_BOOST_SERIALIZATION
-private:
- friend class boost::serialization::access;
-
- template<class Archive>
- void serialize(Archive& ar, const unsigned int /* version */)
- {
- ar & boost::serialization::base_object<supports_flags<> >(*this);
- ar & val;
- ar & prec;
- ar & refc;
- }
-#endif // HAVE_BOOST_SERIALIZATION
};
bool amount_t::is_initialized = false;
@@ -1331,69 +1317,4 @@ void put_amount(property_tree::ptree& st, const amount_t& amt,
st.put("quantity", amt.quantity_string());
}
-#if HAVE_BOOST_SERIALIZATION
-
-template<class Archive>
-void amount_t::serialize(Archive& ar, const unsigned int /* version */)
-{
- ar & is_initialized;
- ar & quantity;
- ar & commodity_;
-}
-
-#endif // HAVE_BOOST_SERIALIZATION
-
} // namespace ledger
-
-#if HAVE_BOOST_SERIALIZATION
-namespace boost {
-namespace serialization {
-
-template <class Archive>
-void serialize(Archive& ar, MP_INT& mpz, const unsigned int /* version */)
-{
- ar & mpz._mp_alloc;
- ar & mpz._mp_size;
- ar & mpz._mp_d;
-}
-
-template <class Archive>
-void serialize(Archive& ar, MP_RAT& mpq, const unsigned int /* version */)
-{
- ar & mpq._mp_num;
- ar & mpq._mp_den;
-}
-
-template <class Archive>
-void serialize(Archive& ar, long unsigned int& integer,
- const unsigned int /* version */)
-{
- ar & make_binary_object(&integer, sizeof(long unsigned int));
-}
-
-} // namespace serialization
-} // namespace boost
-
-BOOST_CLASS_EXPORT(ledger::annotated_commodity_t)
-
-template void boost::serialization::serialize(boost::archive::binary_iarchive&,
- MP_INT&, const unsigned int);
-template void boost::serialization::serialize(boost::archive::binary_oarchive&,
- MP_INT&, const unsigned int);
-template void boost::serialization::serialize(boost::archive::binary_iarchive&,
- MP_RAT&, const unsigned int);
-template void boost::serialization::serialize(boost::archive::binary_oarchive&,
- MP_RAT&, const unsigned int);
-template void boost::serialization::serialize(boost::archive::binary_iarchive&,
- long unsigned int&,
- const unsigned int);
-template void boost::serialization::serialize(boost::archive::binary_oarchive&,
- long unsigned int&,
- const unsigned int);
-
-template void ledger::amount_t::serialize(boost::archive::binary_iarchive&,
- const unsigned int);
-template void ledger::amount_t::serialize(boost::archive::binary_oarchive&,
- const unsigned int);
-
-#endif // HAVE_BOOST_SERIALIZATION