mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
don't use gnc_difftime
because it casts time64 to doubles
This commit is contained in:
@@ -397,7 +397,7 @@ gnc_reconcile_view_new (Account *account, GNCReconcileViewType type,
|
||||
/* Just an extra verification that our query is correct ;) */
|
||||
g_assert (recn == NREC || recn == CREC);
|
||||
|
||||
if (recn == CREC && gnc_difftime (trans_date, statement_date_day_end) <= 0)
|
||||
if (recn == CREC && trans_date <= statement_date_day_end)
|
||||
g_hash_table_insert (view->reconciled, split, split);
|
||||
}
|
||||
}
|
||||
@@ -973,9 +973,8 @@ gnc_reconcile_view_postpone (GNCReconcileView *view)
|
||||
|
||||
// Don't change splits past reconciliation date that haven't been
|
||||
// set to be reconciled
|
||||
if (gnc_difftime (view->statement_date,
|
||||
xaccTransGetDate (xaccSplitGetParent (entry))) >= 0 ||
|
||||
g_hash_table_lookup (view->reconciled, entry))
|
||||
if (view->statement_date >= xaccTransGetDate (xaccSplitGetParent (entry)) ||
|
||||
g_hash_table_lookup (view->reconciled, entry))
|
||||
{
|
||||
recn = g_hash_table_lookup (view->reconciled, entry) ? CREC : NREC;
|
||||
xaccSplitSetReconcile (entry, recn);
|
||||
|
||||
@@ -603,7 +603,6 @@ gnc_save_reconcile_interval(Account *account, time64 statement_date)
|
||||
{
|
||||
time64 prev_statement_date;
|
||||
int days = 0, months = 0;
|
||||
double seconds;
|
||||
|
||||
if (!xaccAccountGetReconcileLastDate (account, &prev_statement_date))
|
||||
return;
|
||||
@@ -611,8 +610,8 @@ gnc_save_reconcile_interval(Account *account, time64 statement_date)
|
||||
/*
|
||||
* Compute the number of days difference.
|
||||
*/
|
||||
seconds = gnc_difftime (statement_date, prev_statement_date);
|
||||
days = (int)(seconds / 60 / 60 / 24);
|
||||
auto seconds = statement_date - prev_statement_date;
|
||||
days = seconds / 60 / 60 / 24;
|
||||
|
||||
/*
|
||||
* See if we need to remember days(weeks) or months. The only trick
|
||||
|
||||
Reference in New Issue
Block a user