mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-26 02:40:43 -06:00
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:
parent
b3773213e6
commit
a624c9fef4
@ -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) {
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user