mirror of
https://github.com/Gnucash/gnucash.git
synced 2024-11-30 20:54:08 -06:00
[commodity-utilities] deprecate gnc-commodity-collector-contains-commodity?
this function is only used once. inline it.
This commit is contained in:
parent
e3160af417
commit
058ef28849
@ -1021,6 +1021,8 @@ construct with gnc:make-gnc-monetary and gnc:monetary->string instead.")
|
||||
(length (collector 'format (lambda (comm amt) comm) #f)))
|
||||
|
||||
(define (gnc-commodity-collector-contains-commodity? collector commodity)
|
||||
(issue-deprecation-warning
|
||||
"gnc-commodity-collector-contains-commodity? is deprecated. please inline.")
|
||||
(member commodity
|
||||
(collector 'format (lambda (comm amt) comm) #f)
|
||||
gnc-commodity-equiv))
|
||||
@ -1031,5 +1033,6 @@ construct with gnc:make-gnc-monetary and gnc:monetary->string instead.")
|
||||
(let ((elts (gnc-commodity-collector-commodity-count amt)))
|
||||
(or (zero? elts)
|
||||
(and (= elts 1)
|
||||
(gnc-commodity-collector-contains-commodity?
|
||||
amt report-commodity)))))
|
||||
(member report-commodity
|
||||
(amt 'format (lambda (comm amt) comm) #f)
|
||||
gnc-commodity-equiv)))))
|
||||
|
@ -66,7 +66,7 @@
|
||||
(export gnc:case-exchange-time-fn)
|
||||
(export gnc:sum-collector-commodity)
|
||||
(export gnc:sum-collector-stocks)
|
||||
(export gnc-commodity-collector-contains-commodity?)
|
||||
(export gnc-commodity-collector-contains-commodity?) ;deprecated
|
||||
|
||||
;; options-utilities.scm
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user