[report-utilities] deprecate gnc:commodity-collectorlist-get-merged

this function is unused
This commit is contained in:
Christopher Lam 2019-02-19 06:59:35 +08:00
parent d7190c0fac
commit 51b6cf600d
3 changed files with 4 additions and 1 deletions

View File

@ -692,7 +692,7 @@
(export gnc:make-number-collector)
(export gnc:make-commodity-collector)
(export gnc:commodity-collector-get-negated)
(export gnc:commodity-collectorlist-get-merged)
(export gnc:commodity-collectorlist-get-merged) ;deprecated
(export gnc-commodity-collector-commodity-count)
(export gnc:account-get-balance-at-date)
(export gnc:account-get-balances-at-dates)

View File

@ -373,6 +373,8 @@ construct gnc:make-gnc-monetary and use gnc:monetary->string instead.")
negated))
(define (gnc:commodity-collectorlist-get-merged collectorlist)
(issue-deprecation-warning
"gnc:commodity-collectorlist-get-merged is now deprecated.")
(let ((merged (gnc:make-commodity-collector)))
(for-each (lambda (collector) (merged 'merge collector #f)) collectorlist)
merged))

View File

@ -197,6 +197,7 @@
(collector->list
(gnc:commodity-collector-get-negated coll-A)))
;; deprecated:
(test-equal "gnc:commodity-collectorlist-get-merged"
'(("USD" . 25) ("GBP" . 0))
(collector->list