From: fred Date: Tue, 5 Nov 1996 14:21:44 +0000 (+0000) Subject: flower-1.0.5 X-Git-Tag: release/1.5.59~6910 X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=65cccc9d33be13b4d2a500269b0a277bb99230a8;p=lilypond.git flower-1.0.5 --- diff --git a/flower/plist.hh b/flower/plist.hh index 3660968a47..8fa126b527 100644 --- a/flower/plist.hh +++ b/flower/plist.hh @@ -44,7 +44,7 @@ class PointerList : public List template -void PL_copy(PointerList &dst,PointerList const&src); +void PL_copy(PointerList &dst,PointerList const&src); #define PL_instantiate(a) L_instantiate(a *); template class PointerList diff --git a/flower/plist.inl b/flower/plist.inl index fb18c87241..b8cd8d6020 100644 --- a/flower/plist.inl +++ b/flower/plist.inl @@ -25,18 +25,17 @@ template inline void PointerList_print( PointerList const & l ) { - List& promises_to_be_const = (List&) l; - for ( Cursor c( promises_to_be_const ); c.ok(); c++ ) - (*c)->print(); + for (PCursor c(l ); c.ok(); c++ ) + c->print(); } template inline void -PL_copy(PointerList &to,PointerList const&src) +PL_copy(PointerList &to,PointerList const&src) { - for (PCursor 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 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); } }