[Account.h] size_t xaccAccountGetSplitsSize returns g_list_length (splits)

which is easily replaced with vector.size()
pull/1918/head
Christopher Lam 2 years ago
parent f08e0f5b61
commit c1ee59c39b

@ -4048,6 +4048,11 @@ xaccAccountGetSplitList (const Account *acc)
return GET_PRIVATE(acc)->splits;
}
size_t
xaccAccountGetSplitsSize (const Account *account)
{
return GNC_IS_ACCOUNT(account) ? g_list_length (GET_PRIVATE(account)->splits) : 0;
}
gboolean gnc_account_and_descendants_empty (Account *acc)
{

@ -1060,6 +1060,8 @@ typedef enum
*/
SplitList* xaccAccountGetSplitList (const Account *account);
size_t xaccAccountGetSplitsSize (const Account *account);
/** The xaccAccountMoveAllSplits() routine reassigns each of the splits
* in accfrom to accto. */
void xaccAccountMoveAllSplits (Account *accfrom, Account *accto);

Loading…
Cancel
Save