]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/cursor.icc
release: 0.0.68pre
[lilypond.git] / flower / include / cursor.icc
index 3390d69026499526aa1ceaed1abb1cbc0dc62563..6a2ae6c538c7344c1d0877426763df36a8b5f57d 100644 (file)
@@ -108,25 +108,37 @@ Cursor<T>::ok()const
 {
     return ( pointer_ != 0 );
 }
-
+template<class T>
+inline void
+Cursor<T>::next() 
+{
+    assert( pointer_ );
+    pointer_ = pointer_->next();
+}
 
 template<class T>
 inline Cursor<T> 
 Cursor<T>::operator ++( int )    
 {
     Cursor<T> r (*this);
-    assert( pointer_ );
-    pointer_ = pointer_->next();
+    next();
     return r;
 }
 
+template<class T>
+inline void
+Cursor<T>::previous() 
+{
+    assert( pointer_ );
+    pointer_ = pointer_->previous();
+}
+
 template<class T>
 inline Cursor<T>
 Cursor<T>::operator --( int )
 {
     Cursor<T> r (*this);
-    assert( pointer_ );
-    pointer_ = pointer_->previous();
+    previous();
     return r;
 }