source file of the GNU LilyPond music typesetter
- (c) 2005--2006 Han-Wen Nienhuys <hanwen@xs4all.nl>
+ (c) 2005--2007 Han-Wen Nienhuys <hanwen@xs4all.nl>
*/
#include "grob-array.hh"
Grob_array::Grob_array ()
{
- ordered_ = false;
+ ordered_ = true;
}
-Link_array__Grob_ &
+vector<Grob*> &
Grob_array::array_reference ()
{
return grobs_;
}
-Link_array__Grob_ const &
+vector<Grob*> const &
Grob_array::array () const
{
return grobs_;
grobs_.clear ();
}
+void
+Grob_array::remove_duplicates ()
+{
+ assert (!ordered_);
+
+ vector_sort (grobs_, less<Grob*> ());
+ ::uniq (grobs_);
+}
+
bool
Grob_array::empty () const
{
}
void
-Grob_array::set_array (Link_array__Grob_ const &src)
+Grob_array::set_array (vector<Grob*> const &src)
{
grobs_ = src;
}
ga->add (unsmob_grob (scm_car (s)));
return arr_scm;
}
+