A couple of performance tweaks.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12261 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
David Hampton 2006-01-05 03:10:27 +00:00
parent b3773213e6
commit a624c9fef4
2 changed files with 6 additions and 1 deletions

View File

@ -785,6 +785,11 @@ gnc_numeric_convert(gnc_numeric in, gint64 denom, gint how)
if(in.denom == denom) {
return in;
}
if(in.num == 0) {
out.num = 0;
out.denom = denom;
return out;
}
/* If the denominator of the input value is negative, get rid of that. */
if(in.denom < 0) {

View File

@ -467,7 +467,7 @@ trn_currency_handler(xmlNodePtr node, gpointer trans_pdata)
Transaction *trn = pdata->trans;
gnc_commodity *ref;
ref = dom_tree_to_commodity_ref_no_engine(node, pdata->book);
ref = dom_tree_to_commodity_ref(node, pdata->book);
xaccTransSetCurrency(trn, ref);
return TRUE;