From 9977463122f5e91e9c51039e63420822743b528c Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Mon, 3 Sep 2012 02:30:17 -0700 Subject: [PATCH] You no longer need .getFullText() on an operator<< to an ostream. There's like 25 of them in TransactionEngine.cpp that can be removed when convenient --- src/Amount.cpp | 4 ++-- src/SerializedTypes.h | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Amount.cpp b/src/Amount.cpp index b1588dc05a..afd6da562e 100644 --- a/src/Amount.cpp +++ b/src/Amount.cpp @@ -838,8 +838,8 @@ bool STAmount::applyOffer( saTakerPaid = saTakerFunds; // Taker paid all he had. saTakerGot = divide(multiply(saTakerFunds, saOfferPaysAvailable, CURRENCY_ONE, ACCOUNT_ONE), saOfferGetsAvailable, saOfferPays.getCurrency(), saOfferPays.getIssuer()); - Log(lsINFO) << "applyOffer: saTakerGot=" << saTakerGot.getFullText(); - Log(lsINFO) << "applyOffer: saOfferPaysAvailable=" << saOfferPaysAvailable.getFullText(); + Log(lsINFO) << "applyOffer: saTakerGot=" << saTakerGot; + Log(lsINFO) << "applyOffer: saOfferPaysAvailable=" << saOfferPaysAvailable; } return saTakerGot >= saOfferPays; diff --git a/src/SerializedTypes.h b/src/SerializedTypes.h index 1017f758a3..12abb0370c 100644 --- a/src/SerializedTypes.h +++ b/src/SerializedTypes.h @@ -100,6 +100,7 @@ public: inline SerializedType* new_clone(const SerializedType& s) { return s.clone().release(); } inline void delete_clone(const SerializedType* s) { boost::checked_delete(s); } +inline std::ostream& operator<<(std::ostream& out, const SerializedType& t) { return out << t.getFullText(); } class STUInt8 : public SerializedType {