r14614 - gnucash/trunk/src/backend/file - Remove some unnecessary calls to xaccAccountInsertSplit() since the only way

Chris Shoemaker chris at cvs.gnucash.org
Tue Aug 8 18:55:03 EDT 2006


Author: chris
Date: 2006-08-08 18:55:02 -0400 (Tue, 08 Aug 2006)
New Revision: 14614
Trac: http://svn.gnucash.org/trac/changeset/14614

Modified:
   gnucash/trunk/src/backend/file/io-gncxml-v2.c
Log:
   Remove some unnecessary calls to xaccAccountInsertSplit() since the only way
   the Split could have the Account pointer is if it had already been added to
   the Account.


Modified: gnucash/trunk/src/backend/file/io-gncxml-v2.c
===================================================================
--- gnucash/trunk/src/backend/file/io-gncxml-v2.c	2006-08-08 22:52:37 UTC (rev 14613)
+++ gnucash/trunk/src/backend/file/io-gncxml-v2.c	2006-08-08 22:55:02 UTC (rev 14614)
@@ -218,8 +218,6 @@
 add_transaction_local(sixtp_gdv2 *data, Transaction *trn)
 {
     gnc_commodity_table *table;
-    Split *spl;
-    int i;
     
     table = gnc_book_get_commodity_table (data->book);
 
@@ -229,13 +227,6 @@
                                    xaccTransSetCurrency);
 
     xaccTransScrubCurrency (trn);
-
-    for(i = 0, spl = xaccTransGetSplit(trn, i);
-        spl;
-        i++, spl = xaccTransGetSplit(trn, i))
-    {
-        xaccAccountInsertSplit(xaccSplitGetAccount(spl), spl);
-    }
     xaccTransCommitEdit (trn);
 
     data->counter.transactions_loaded++;



More information about the gnucash-changes mailing list