]> git.donarmstrong.com Git - lilypond.git/commitdiff
flower-1.0.5
authorfred <fred>
Tue, 5 Nov 1996 14:21:44 +0000 (14:21 +0000)
committerfred <fred>
Tue, 5 Nov 1996 14:21:44 +0000 (14:21 +0000)
flower/plist.hh
flower/plist.inl

index 3660968a47e8b1620fdb065b893bab5764c4d4bf..8fa126b52777fa5fdbe3880cd7785ad0e6249ec3 100644 (file)
@@ -44,7 +44,7 @@ class PointerList : public List<T>
 
 
 template<class T>
-void PL_copy(PointerList<T> &dst,PointerList<T> const&src);
+void PL_copy(PointerList<T*> &dst,PointerList<T*> const&src);
 
 #define PL_instantiate(a) L_instantiate(a *); template class PointerList<a*>
 
index fb18c872413b6cfbd4691716fa37463c16bc5457..b8cd8d602099a39268c89db40b3636091d618a55 100644 (file)
@@ -25,18 +25,17 @@ template<class T>
 inline void
 PointerList_print( PointerList<T> const & l  ) 
 {
-    List<T>& promises_to_be_const = (List<T>&) l;
-    for ( Cursor<T> c( promises_to_be_const ); c.ok(); c++ )
-        (*c)->print();  
+    for (PCursor<T> c(l ); c.ok(); c++ )
+        c->print();  
 }
 
 template<class T>
 inline void
-PL_copy(PointerList<T> &to,PointerList<T> const&src)
+PL_copy(PointerList<T*> &to,PointerList<T*> const&src)
 {
-    for (PCursor<T> pc(src); pc.ok(); pc++) {
-       T q = pc;
-       T p=new typeof(*q) (*q) ; // argh, how do i do this in ANSI-C++
+    for (PCursor<T*> pc(src); pc.ok(); pc++) {
+       T *q = pc;
+       T *p=new T(*q) ; // argh, how do i do this in ANSI-C++
        to.bottom().add(p);
     }
 }