Janek Warchoł <[email protected]> writes:

> On Thu, Aug 23, 2012 at 3:45 PM, David Kastrup <[email protected]> wrote:
>> Janek Warchoł <[email protected]> writes:
>>> just FYI, the barline problem was fixed in 2.15.10 (commit
>>> b92ea16ef75d8aaa7bdb9f492b58d7af906e7945).
>>
>> While it will likely catch most uses, bar_line_color == staff_color is
>> mixing C operators and only compares for strict eq-equivalence.  It
>> might make more sense to write
>>
>>     ly_is_equal (bar_line_color, staff_color)
>>
>> here instead.
>
> I understand that you refer to how it should be done in c++ code?
>
> I mean, this has been ported to Scheme entirely
> (deafba084c8ecf6af02f64455856147821b598c7), and the logic is now in
> scm/bar-line.scm, line 356.  I don't see your comment being applicable
> to this new scheme code - am i missing something?

(if (eq? bar-line-color staff-color) ...

should likely be (if (equal? bar-line-color staff-color) ...

since you otherwise get

guile> (eq? (rgb-color 0 0 0) (rgb-color 0 0 0))
#f
guile> (equal? (rgb-color 0 0 0) (rgb-color 0 0 0))
#t
guile> 

Annoyingly, (rgb-color 0 0 0) is still different from (rgb-color
0. 0. 0.).  But at least if you use the same invocation, the colors
should arguably be considered equal.

-- 
David Kastrup

_______________________________________________
bug-lilypond mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-lilypond

Reply via email to