[report-utilities] deprecate gnc:acccounts-get-all-subaccounts

* this function has a typo in name
* all uses of accounts-get-all-subaccounts were followed by appending
the result to the original accounts list. we have already rewritten to
use the better function in previous commit. this is now obsolete.
* inline its last use, omit sorting. list is sorted anyway afterwards.
pull/578/head
Christopher Lam 7 years ago
parent 2ac8cb2f79
commit e386a2a77d

@ -687,7 +687,7 @@
(export gnc:accounts-get-commodities)
(export gnc:get-current-account-tree-depth)
(export gnc:accounts-and-all-descendants)
(export gnc:acccounts-get-all-subaccounts)
(export gnc:acccounts-get-all-subaccounts) ;deprecated
(export gnc:make-stats-collector) ;deprecated
(export gnc:make-drcr-collector) ;deprecated
(export gnc:make-value-collector)

@ -146,14 +146,14 @@ construct gnc:make-gnc-monetary and use gnc:monetary->string instead.")
;; Get all children of this list of accounts.
(define (gnc:acccounts-get-all-subaccounts accountlist)
(issue-deprecation-warning "gnc:acccounts-get-all-subaccounts is unused.")
(append-map gnc-account-get-descendants-sorted
accountlist))
;; Return accountslist *and* their descendant accounts
(define (gnc:accounts-and-all-descendants accountslist)
(sort-and-delete-duplicates
(append accountslist
(gnc:acccounts-get-all-subaccounts accountslist))
(apply append accountslist (map gnc-account-get-descendants accountslist))
(lambda (a b)
(string<? (gnc-account-get-full-name a) (gnc-account-get-full-name b)))
equal?))

Loading…
Cancel
Save