}
void
-score_remove_chord (score_chord_t *chord)
+score_staff_remove_chords (score_staff_t *staff)
{
- score_staff_t *staff = chord->staff;
- int i;
-
- for (i = 0; i < staff->num_chords; i++)
- if (staff->chords[i] == chord)
- break;
+ talloc_free (staff->chords);
+ staff->chords = NULL;
- if (i == staff->num_chords)
- return;
+ staff->num_chords = 0;
+}
- if (i < staff->num_chords - 1)
- {
- memmove (staff->chords + i,
- staff->chords + i + 1,
- (staff->num_chords - 1 - i) * sizeof (score_chord_t *));
- }
+void
+score_remove_chords (score_t *score)
+{
+ int i;
- staff->num_chords -= 1;
+ for (i = 0; i < score->num_staves; i++)
+ score_staff_remove_chords (score->staves[i]);
}
void