Make sure the splitlist is sorted before we return it.

git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@16608 57a11ea4-9604-0410-9ed3-97b8803252fd
This commit is contained in:
Derek Atkins 2007-12-02 16:51:07 +00:00
parent 3088388051
commit 879ed4470f

View File

@ -3298,10 +3298,13 @@ xaccAccountGetBalanceChangeForPeriod (Account *acc, time_t t1, time_t t2, gboole
* allowing the internal organization to change data structures if
* necessary for whatever reason, while leaving the external API
* unchanged. */
/* XXX: violates the const'ness by forcing a sort before returning
* the splitlist */
SplitList *
xaccAccountGetSplitList (const Account *acc)
{
g_return_val_if_fail(GNC_IS_ACCOUNT(acc), NULL);
xaccAccountSortSplits((Account*)acc, FALSE); // normally a noop
return GET_PRIVATE(acc)->splits;
}