summaryrefslogtreecommitdiff
path: root/flower/list.cc
diff options
context:
space:
mode:
authorHan-Wen Nienhuys <hanwen@xs4all.nl>1996-11-01 17:48:30 +0100
committerHan-Wen Nienhuys <hanwen@xs4all.nl>1996-11-01 17:48:30 +0100
commit74e0f769a23454f038d20270463c734a9c22f5f9 (patch)
tree5c6dfd530af24e22b8154bf1c6bc7a787d5f3b25 /flower/list.cc
parent3daac955f29e408aa2aa271a883195ddc54633f4 (diff)
release: 0.0.4
Diffstat (limited to 'flower/list.cc')
-rw-r--r--flower/list.cc31
1 files changed, 13 insertions, 18 deletions
diff --git a/flower/list.cc b/flower/list.cc
index 782b3da86e..741e4ee97c 100644
--- a/flower/list.cc
+++ b/flower/list.cc
@@ -4,6 +4,15 @@
#include "list.hh"
template<class T>
+List<T>::List(List const&src)
+{
+ set_empty();
+ // probably el stupido
+ for (Cursor<T> c(src); c.ok(); c++)
+ bottom().add(c);
+}
+
+template<class T>
void
List<T>::OK() const
{
@@ -29,7 +38,7 @@ template<class T>
Cursor<T>
List<T>::top()
{
-
+#if 0
// ?? waarvoor is deze if ?
if ( top_ ) // equivalent: if ( size_ )
{
@@ -42,7 +51,9 @@ List<T>::top()
t = top_->previous();
}
}
- // list empty: Cursor not ok()
+#endif
+
+// list empty: Cursor not ok()
return Cursor<T>( *this, top_ );
}
@@ -70,20 +81,4 @@ List<T>::bottom()
}
-// not inlined since it assumes knowledge of destructor.
-template<class T>
-inline void
-PointerList<T>::remove( Cursor<T> me )
-{
- if ( me.ok() )
- {
-
- delete *me;
- List<T>::remove( me );
- }
-}
-
-
-
-
#endif