]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/plist.icc
release: 0.1.11
[lilypond.git] / flower / include / plist.icc
index f24e0ddf4500ecbc96c3989ac20c5888c74ac37f..d81b322e48dac5e58461e86c6bffdcbf39dfeb7e 100644 (file)
@@ -1,21 +1,33 @@
 /* -*-c++-*-
   plist.icc -- part of flowerlib
 
-  (c) 1996 Han-Wen Nienhuys& Jan Nieuwenhuizen
+  (c) 1996,1997 Han-Wen Nienhuys& Jan Nieuwenhuizen
 */
 
 #ifndef PLIST_INL
 #define PLIST_INL
 
 template<class T>
-void
-PL_copy(IPointer_list<T*> &to, IPointer_list<T*> const&src)
+inline void
+PL_copy (Pointer_list<T*> &to, Pointer_list<T*> const&src)
 {
-    for (PCursor<T*> pc(src); pc.ok(); pc++) {
+  for (PCursor<T*> pc (src); pc.ok(); pc++) 
+    {
        T *q = pc;
        T *p=new T(*q) ; 
-       to.bottom().add(p);
+       to.bottom().add (p);
     }
 }
 
+
+template<class T>
+inline PCursor<T> 
+Link_list<T>::find (T what) const
+{
+  PCursor<T> i (*this);
+  for (; i.ok(); i++)
+       if (i.ptr() == what)
+          break;
+  return i;    
+}
 #endif