From 0f1afdb3a7387e834c62b4ecc0a993bdde62d8f8 Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Thu, 3 Jun 2010 05:47:12 -0400 Subject: Minor optimization of amount_t::operator* --- src/amount.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/amount.h') diff --git a/src/amount.h b/src/amount.h index ae0e5a69..1ac4b37e 100644 --- a/src/amount.h +++ b/src/amount.h @@ -275,7 +275,10 @@ public: amount_t& operator+=(const amount_t& amt); amount_t& operator-=(const amount_t& amt); - amount_t& operator*=(const amount_t& amt); + amount_t& operator*=(const amount_t& amt) { + return multiply(amt); + } + amount_t& multiply(const amount_t& amt, bool ignore_commodity = false); /** Divide two amounts while extending the precision to preserve the accuracy of the result. For example, if \c 10 is divided by \c 3, -- cgit v1.2.3