]> git.donarmstrong.com Git - lilypond.git/commitdiff
lilypond-1.1.30
authorfred <fred>
Tue, 26 Mar 2002 21:47:02 +0000 (21:47 +0000)
committerfred <fred>
Tue, 26 Mar 2002 21:47:02 +0000 (21:47 +0000)
lily/molecule.cc

index caffe1a74cd87c690cf087c717713cb7d68d1dcc..142a7af91cfa6bfbd6b02f3f59243b1a01ba2be5 100644 (file)
@@ -11,6 +11,7 @@
 #include "molecule.hh"
 #include "atom.hh"
 #include "debug.hh"
+
 #include "killing-cons.tcc"
 
 Box
@@ -39,20 +40,21 @@ void
 Molecule::translate_axis (Real x,Axis a)
 {
   for (Cons<Atom> *  ptr = atom_list_; ptr; ptr = ptr->next_)
-    {
       ptr->car_->off_[a] += x;
-    }
+
   dim_[a] += x;
 }
 
 void
 Molecule::add_molecule (Molecule const &m)
 {
-  for (Cons<Atom> *  ptr = m.atom_list_; ptr; ptr = ptr->next_)
+  Cons_list<Atom> al (copy_killing_cons_list (m.atom_list_));
+
+  if (al.head_)
     {
-      add_atom (ptr->car_);
+      *al.tail_ = atom_list_;
+      atom_list_ = al.head_;
     }
-
   dim_.unite (m.dim_);
 }