]> git.donarmstrong.com Git - lilypond.git/commitdiff
flower-1.0.12
authorfred <fred>
Fri, 6 Dec 1996 00:35:43 +0000 (00:35 +0000)
committerfred <fred>
Fri, 6 Dec 1996 00:35:43 +0000 (00:35 +0000)
flower/cursor.cc
flower/cursor.inl

index 75f607dcaaefe86cfe8cbdaf5bc9b47035a38a03..3d2116c46f826b28350b39ba3fa41f4ec58feb8e 100644 (file)
@@ -5,14 +5,25 @@
 #include <assert.h>
 
 template<class T>
-Cursor<T> 
-Cursor<T>::operator ++( int )    
+ void
+Cursor<T>::backspace()
 {
-    Cursor<T> r = *this;
-    assert( pointer_ );
-    pointer_ = pointer_->next();
-    return r;
+    Cursor<T> c(*this);
+    c--;        
+    list_.remove( *this );
+}
+
+template<class T>
+ void
+Cursor<T>::del()
+{
+    Cursor<T> c(*this);
+    c++;
+    list_.remove( *this );    
+    *this = c;
 }
+
+
 template<class T>
 Cursor<T> 
 Cursor<T>::operator -=( int j )    
@@ -30,16 +41,6 @@ Cursor<T>::operator +=( int j )
     return *this;
 }
 
-template<class T>
-Cursor<T>
-Cursor<T>::operator --( int )
-{
-    Cursor<T> r = *this;
-    assert( pointer_ );
-    pointer_ = pointer_->previous();
-    return r;
-}
-
 template<class T>
 Cursor<T> 
 Cursor<T>::operator +( int i ) const    
index 0b077bd811d0aac1cca336eaebafc2e290f67589..4337ef446afa452246c87d39158a39545afdd71e 100644 (file)
@@ -54,25 +54,6 @@ Cursor<T>::insert( const T& th )
     list_.insert( th, *this );
 }
 
-template<class T>
-inline void
-Cursor<T>::backspace()
-{
-    Cursor<T> c(*this);
-    c--;        
-    list_.remove( *this );
-}
-
-template<class T>
-inline void
-Cursor<T>::del()
-{
-    Cursor<T> c(*this);
-    c++;
-    list_.remove( *this );    
-    *this = c;
-}
-
 template<class T>
 inline const List<T>&
 Cursor<T>::list() const
@@ -108,4 +89,25 @@ Cursor<T>::ok()
     return ( pointer_ != 0 );
 }
 
+
+template<class T>
+inline Cursor<T> 
+Cursor<T>::operator ++( int )    
+{
+    Cursor<T> r (*this);
+    assert( pointer_ );
+    pointer_ = pointer_->next();
+    return r;
+}
+
+template<class T>
+inline Cursor<T>
+Cursor<T>::operator --( int )
+{
+    Cursor<T> r (*this);
+    assert( pointer_ );
+    pointer_ = pointer_->previous();
+    return r;
+}
+
 #endif