From 04461f49fdc0f70d74172c77843be3e0a9fe313f Mon Sep 17 00:00:00 2001 From: John Wiegley Date: Wed, 26 May 2010 00:58:04 -0600 Subject: Optimized amount_t::in_place_truncate --- src/amount.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src/amount.h') diff --git a/src/amount.h b/src/amount.h index 5c1bca46..ae0e5a69 100644 --- a/src/amount.h +++ b/src/amount.h @@ -346,9 +346,7 @@ public: temp.in_place_truncate(); return temp; } - void in_place_truncate() { - *this = amount_t(to_string()); - } + void in_place_truncate(); /** Yields an amount which has lost all of its extra precision, beyond what the display precision of the commodity would have printed. */ -- cgit v1.2.3