diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/amount.cc | 10 | ||||
-rw-r--r-- | src/amount.h | 2 | ||||
-rw-r--r-- | src/filters.cc | 6 | ||||
-rw-r--r-- | src/xact.h | 4 |
4 files changed, 4 insertions, 18 deletions
diff --git a/src/amount.cc b/src/amount.cc index 1d1a3c36..9a1dd12b 100644 --- a/src/amount.cc +++ b/src/amount.cc @@ -60,17 +60,16 @@ struct amount_t::bigint_t : public supports_flags<> mpq_t val; precision_t prec; uint_least16_t ref; - uint_fast32_t index; #define MP(bigint) ((bigint)->val) - bigint_t() : prec(0), ref(1), index(0) { + bigint_t() : prec(0), ref(1) { TRACE_CTOR(bigint_t, ""); mpq_init(val); } bigint_t(const bigint_t& other) : supports_flags<>(other.flags() & ~BIGINT_BULK_ALLOC), - prec(other.prec), ref(1), index(0) { + prec(other.prec), ref(1) { TRACE_CTOR(bigint_t, "copy"); mpq_init(val); mpq_set(val, other.val); @@ -94,11 +93,6 @@ struct amount_t::bigint_t : public supports_flags<> } }; -uint_fast32_t amount_t::sizeof_bigint_t() -{ - return sizeof(bigint_t); -} - void amount_t::initialize() { mpz_init(temp); diff --git a/src/amount.h b/src/amount.h index 1e41e148..8229b015 100644 --- a/src/amount.h +++ b/src/amount.h @@ -137,8 +137,6 @@ public: matter what the precision of an individual commodity may be. */ static bool stream_fullstrings; - static uint_fast32_t sizeof_bigint_t(); - protected: void _copy(const amount_t& amt); void _dup(); diff --git a/src/filters.cc b/src/filters.cc index d91d12ff..9be7e486 100644 --- a/src/filters.cc +++ b/src/filters.cc @@ -186,12 +186,8 @@ void calc_xacts::operator()(xact_t& xact) try { xact_t::xdata_t& xdata(xact.xdata()); - if (last_xact && last_xact->has_xdata()) { + if (last_xact && last_xact->has_xdata()) add_or_set_value(xdata.total, last_xact->xdata().total); - xdata.index = last_xact->xdata().index + 1; - } else { - xdata.index = 0; - } if (! xdata.has_flags(XACT_EXT_NO_TOTAL)) xact.add_to_value(xdata.total); @@ -142,14 +142,13 @@ public: value_t total; value_t sort_value; value_t value; - std::size_t index; date_t date; account_t * account; void * ptr; optional<xacts_list> component_xacts; - xdata_t() : supports_flags<>(), index(0), account(NULL), ptr(NULL) { + xdata_t() : supports_flags<>(), account(NULL), ptr(NULL) { TRACE_CTOR(xact_t::xdata_t, ""); } xdata_t(const xdata_t& other) @@ -157,7 +156,6 @@ public: total(other.total), sort_value(other.sort_value), value(other.value), - index(other.index), date(other.date), account(other.account), ptr(NULL) |