Removed unneeded member variables.

This commit is contained in:
John Wiegley 2009-02-04 00:34:50 -04:00
parent e874e580cf
commit 24ef163ba5
4 changed files with 4 additions and 18 deletions

View file

@ -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);

View file

@ -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();

View file

@ -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);

View file

@ -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)