Removed unneeded member variables.
This commit is contained in:
parent
e874e580cf
commit
24ef163ba5
4 changed files with 4 additions and 18 deletions
|
|
@ -60,17 +60,16 @@ struct amount_t::bigint_t : public supports_flags<>
|
||||||
mpq_t val;
|
mpq_t val;
|
||||||
precision_t prec;
|
precision_t prec;
|
||||||
uint_least16_t ref;
|
uint_least16_t ref;
|
||||||
uint_fast32_t index;
|
|
||||||
|
|
||||||
#define MP(bigint) ((bigint)->val)
|
#define MP(bigint) ((bigint)->val)
|
||||||
|
|
||||||
bigint_t() : prec(0), ref(1), index(0) {
|
bigint_t() : prec(0), ref(1) {
|
||||||
TRACE_CTOR(bigint_t, "");
|
TRACE_CTOR(bigint_t, "");
|
||||||
mpq_init(val);
|
mpq_init(val);
|
||||||
}
|
}
|
||||||
bigint_t(const bigint_t& other)
|
bigint_t(const bigint_t& other)
|
||||||
: supports_flags<>(other.flags() & ~BIGINT_BULK_ALLOC),
|
: supports_flags<>(other.flags() & ~BIGINT_BULK_ALLOC),
|
||||||
prec(other.prec), ref(1), index(0) {
|
prec(other.prec), ref(1) {
|
||||||
TRACE_CTOR(bigint_t, "copy");
|
TRACE_CTOR(bigint_t, "copy");
|
||||||
mpq_init(val);
|
mpq_init(val);
|
||||||
mpq_set(val, other.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()
|
void amount_t::initialize()
|
||||||
{
|
{
|
||||||
mpz_init(temp);
|
mpz_init(temp);
|
||||||
|
|
|
||||||
|
|
@ -137,8 +137,6 @@ public:
|
||||||
matter what the precision of an individual commodity may be. */
|
matter what the precision of an individual commodity may be. */
|
||||||
static bool stream_fullstrings;
|
static bool stream_fullstrings;
|
||||||
|
|
||||||
static uint_fast32_t sizeof_bigint_t();
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _copy(const amount_t& amt);
|
void _copy(const amount_t& amt);
|
||||||
void _dup();
|
void _dup();
|
||||||
|
|
|
||||||
|
|
@ -186,12 +186,8 @@ void calc_xacts::operator()(xact_t& xact)
|
||||||
try {
|
try {
|
||||||
xact_t::xdata_t& xdata(xact.xdata());
|
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);
|
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))
|
if (! xdata.has_flags(XACT_EXT_NO_TOTAL))
|
||||||
xact.add_to_value(xdata.total);
|
xact.add_to_value(xdata.total);
|
||||||
|
|
|
||||||
|
|
@ -142,14 +142,13 @@ public:
|
||||||
value_t total;
|
value_t total;
|
||||||
value_t sort_value;
|
value_t sort_value;
|
||||||
value_t value;
|
value_t value;
|
||||||
std::size_t index;
|
|
||||||
date_t date;
|
date_t date;
|
||||||
account_t * account;
|
account_t * account;
|
||||||
void * ptr;
|
void * ptr;
|
||||||
|
|
||||||
optional<xacts_list> component_xacts;
|
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, "");
|
TRACE_CTOR(xact_t::xdata_t, "");
|
||||||
}
|
}
|
||||||
xdata_t(const xdata_t& other)
|
xdata_t(const xdata_t& other)
|
||||||
|
|
@ -157,7 +156,6 @@ public:
|
||||||
total(other.total),
|
total(other.total),
|
||||||
sort_value(other.sort_value),
|
sort_value(other.sort_value),
|
||||||
value(other.value),
|
value(other.value),
|
||||||
index(other.index),
|
|
||||||
date(other.date),
|
date(other.date),
|
||||||
account(other.account),
|
account(other.account),
|
||||||
ptr(NULL)
|
ptr(NULL)
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue