[Gnucash-changes] r12261 - gnucash/trunk - A couple of performance
tweaks.
David Hampton
hampton at cvs.gnucash.org
Wed Jan 4 22:10:28 EST 2006
Author: hampton
Date: 2006-01-04 22:10:27 -0500 (Wed, 04 Jan 2006)
New Revision: 12261
Trac: http://svn.gnucash.org/trac/changeset/12261
Modified:
gnucash/trunk/lib/libqof/qof/gnc-numeric.c
gnucash/trunk/src/backend/file/gnc-transaction-xml-v2.c
Log:
A couple of performance tweaks.
Modified: gnucash/trunk/lib/libqof/qof/gnc-numeric.c
===================================================================
--- gnucash/trunk/lib/libqof/qof/gnc-numeric.c 2006-01-05 01:38:27 UTC (rev 12260)
+++ gnucash/trunk/lib/libqof/qof/gnc-numeric.c 2006-01-05 03:10:27 UTC (rev 12261)
@@ -785,6 +785,11 @@
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) {
Modified: gnucash/trunk/src/backend/file/gnc-transaction-xml-v2.c
===================================================================
--- gnucash/trunk/src/backend/file/gnc-transaction-xml-v2.c 2006-01-05 01:38:27 UTC (rev 12260)
+++ gnucash/trunk/src/backend/file/gnc-transaction-xml-v2.c 2006-01-05 03:10:27 UTC (rev 12261)
@@ -467,7 +467,7 @@
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;
More information about the gnucash-changes
mailing list