Left: | ||
Right: |
OLD | NEW |
---|---|
1 /* | 1 /* |
2 This file is part of LilyPond, the GNU music typesetter. | 2 This file is part of LilyPond, the GNU music typesetter. |
3 | 3 |
4 Copyright (C) 2002--2011 Juergen Reuter <reuter@ipd.uka.de> | 4 Copyright (C) 2002--2011 Juergen Reuter <reuter@ipd.uka.de> |
5 | 5 |
6 Han-Wen Nienhuys <hanwen@xs4all.nl | 6 Han-Wen Nienhuys <hanwen@xs4all.nl |
7 | 7 |
8 LilyPond is free software: you can redistribute it and/or modify | 8 LilyPond is free software: you can redistribute it and/or modify |
9 it under the terms of the GNU General Public License as published by | 9 it under the terms of the GNU General Public License as published by |
10 the Free Software Foundation, either version 3 of the License, or | 10 the Free Software Foundation, either version 3 of the License, or |
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
163 { | 163 { |
164 Pitch p = pitch_interval_[d]; | 164 Pitch p = pitch_interval_[d]; |
165 heads_[d]->set_property ("cause", causes_[d]->self_scm ()); | 165 heads_[d]->set_property ("cause", causes_[d]->self_scm ()); |
166 heads_[d]->set_property ("staff-position", | 166 heads_[d]->set_property ("staff-position", |
167 scm_from_int (start_c0_ + p.steps ())); | 167 scm_from_int (start_c0_ + p.steps ())); |
168 | 168 |
169 SCM handle = scm_assoc (scm_cons (scm_from_int (p.get_octave ()), | 169 SCM handle = scm_assoc (scm_cons (scm_from_int (p.get_octave ()), |
170 scm_from_int (p.get_notename ())), | 170 scm_from_int (p.get_notename ())), |
171 start_key_sig_); | 171 start_key_sig_); |
172 | 172 |
173 if (handle == SCM_BOOL_F) | 173 if (scm_is_false (handle)) |
174 handle = scm_assoc (scm_from_int (p.get_notename ()), | 174 handle = scm_assoc (scm_from_int (p.get_notename ()), |
175 start_key_sig_); | 175 start_key_sig_); |
176 | 176 |
177 Rational sig_alter = (handle != SCM_BOOL_F) | 177 Rational sig_alter = !scm_is_false (handle) |
Reinhold
2011/08/18 13:32:17
As we are calling cdr on the handle, it would prob
Cécile Hauchemaille
2011/08/18 14:03:06
So, might scm_is_pair also work ?
dak
2011/08/18 14:08:04
ly_is_list is much less efficient (it traverses th
Reinhold
2011/08/18 14:18:45
Yes, of course, that's the correct check...
dak
2011/08/18 15:46:43
It is a check that will work correctly. However,
| |
178 ? robust_scm2rational (scm_cdr (handle), Rational (0)) | 178 ? robust_scm2rational (scm_cdr (handle), Rational (0)) |
179 : Rational (0); | 179 : Rational (0); |
180 | 180 |
181 const Pitch other = pitch_interval_[-d]; | 181 const Pitch other = pitch_interval_[-d]; |
182 | 182 |
183 if (sig_alter == p.get_alteration () | 183 if (sig_alter == p.get_alteration () |
184 && !((p.steps () == other.steps ()) | 184 && !((p.steps () == other.steps ()) |
185 && (p.get_alteration () != other.get_alteration ()))) | 185 && (p.get_alteration () != other.get_alteration ()))) |
186 { | 186 { |
187 accidentals_[d]->suicide (); | 187 accidentals_[d]->suicide (); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
229 "AmbitusLine " | 229 "AmbitusLine " |
230 "AmbitusNoteHead ", | 230 "AmbitusNoteHead ", |
231 | 231 |
232 /* read */ | 232 /* read */ |
233 "keySignature " | 233 "keySignature " |
234 "middleCPosition ", | 234 "middleCPosition ", |
235 | 235 |
236 /* write */ | 236 /* write */ |
237 "" | 237 "" |
238 ); | 238 ); |
OLD | NEW |