#include "accidental-placement.hh"
-#include "rhythmic-head.hh"
#include "accidental-interface.hh"
#include "music.hh"
#include "note-collision.hh"
return sign (ape_priority (a) - ape_priority (b));
}
-bool ape_less (Accidental_placement_entry *const &a,
- Accidental_placement_entry *const &b)
-{
- return ape_priority (a) < ape_priority (b);
-}
-
int ape_rcompare (Accidental_placement_entry *const &a,
Accidental_placement_entry *const &b)
{
{
vector<Accidental_placement_entry*> asc = *apes;
- vector_sort (asc, &ape_less);
+ vector_sort (asc, &ape_compare);
apes->clear ();
for (vsize i = note_cols.size (); i--;)
concat (heads, extract_grob_array (note_cols[i], "note-heads"));
- vector_sort (heads, less<Grob*> ());
+ vector_sort (heads, default_compare);
uniq (heads);
common[Y_AXIS] = common_refpoint_of_array (heads, common[Y_AXIS], Y_AXIS);
Accidental_placement_entry *head_ape = new Accidental_placement_entry;
common[X_AXIS] = common_refpoint_of_array (heads, common[X_AXIS], X_AXIS);
vector<Skyline_entry> head_skyline (empty_skyline (LEFT));
-
- vector<Grob *> stems;
- for (vsize i = 0; i < heads.size (); i++)
- if (Grob *s = Rhythmic_head::get_stem (heads[i]))
- stems.push_back (s);
- vector_sort (stems, less<Grob*> ());
- uniq (stems);
- concat (heads, stems);
-
vector<Box> head_extents;
for (vsize i = heads.size (); i--;)
{