From 837c89dfd6934795029de3ad90d1bdd0e1de8eb2 Mon Sep 17 00:00:00 2001 From: fred Date: Fri, 6 Dec 1996 00:35:43 +0000 Subject: [PATCH] flower-1.0.12 --- flower/cursor.cc | 33 +++++++++++++++++---------------- flower/cursor.inl | 40 +++++++++++++++++++++------------------- 2 files changed, 38 insertions(+), 35 deletions(-) diff --git a/flower/cursor.cc b/flower/cursor.cc index 75f607dcaa..3d2116c46f 100644 --- a/flower/cursor.cc +++ b/flower/cursor.cc @@ -5,14 +5,25 @@ #include template -Cursor -Cursor::operator ++( int ) + void +Cursor::backspace() { - Cursor r = *this; - assert( pointer_ ); - pointer_ = pointer_->next(); - return r; + Cursor c(*this); + c--; + list_.remove( *this ); +} + +template + void +Cursor::del() +{ + Cursor c(*this); + c++; + list_.remove( *this ); + *this = c; } + + template Cursor Cursor::operator -=( int j ) @@ -30,16 +41,6 @@ Cursor::operator +=( int j ) return *this; } -template -Cursor -Cursor::operator --( int ) -{ - Cursor r = *this; - assert( pointer_ ); - pointer_ = pointer_->previous(); - return r; -} - template Cursor Cursor::operator +( int i ) const diff --git a/flower/cursor.inl b/flower/cursor.inl index 0b077bd811..4337ef446a 100644 --- a/flower/cursor.inl +++ b/flower/cursor.inl @@ -54,25 +54,6 @@ Cursor::insert( const T& th ) list_.insert( th, *this ); } -template -inline void -Cursor::backspace() -{ - Cursor c(*this); - c--; - list_.remove( *this ); -} - -template -inline void -Cursor::del() -{ - Cursor c(*this); - c++; - list_.remove( *this ); - *this = c; -} - template inline const List& Cursor::list() const @@ -108,4 +89,25 @@ Cursor::ok() return ( pointer_ != 0 ); } + +template +inline Cursor +Cursor::operator ++( int ) +{ + Cursor r (*this); + assert( pointer_ ); + pointer_ = pointer_->next(); + return r; +} + +template +inline Cursor +Cursor::operator --( int ) +{ + Cursor r (*this); + assert( pointer_ ); + pointer_ = pointer_->previous(); + return r; +} + #endif -- 2.39.5