]> git.donarmstrong.com Git - lilypond.git/blobdiff - flower/include/link.icc
release: 1.1.42
[lilypond.git] / flower / include / link.icc
index 3926d6bc2ae3db95737315ee414e283d7fd6c9c9..4b3c886aad95625ec4d06b3e6aebb60837694a2d 100644 (file)
@@ -8,30 +8,32 @@ void
 Link<T>::OK() const
 {
 #ifndef NDEBUG
-    if (previous_) {
-       assert(previous_->next_ == this);
+  if (previous_) 
+    {
+      assert (previous_->next_ == this);
     }
-    if (next_) {
-       assert(next_->previous_ == this);
+  if (next_) 
+    {
+      assert (next_->previous_ == this);
     }
 #endif    
 }
 
 template<class T>
 inline
-Link<T>::Link( const T& thing ) : 
-    thing_( thing )
+Link<T>::Link (const T& thing) : 
+  thing_(thing)
 {
-    previous_ = next_ = 0;
+  previous_ = next_ = 0;
 }
 
 template<class T>
 inline
-Link<T>::Link( Link<T>* previous, Link<T>* next, const T& thing ) : 
-    thing_( thing )
+Link<T>::Link (Link<T>* previous, Link<T>* next, const T& thing) : 
+  thing_(thing)
 {
-    previous_ = previous;
-    next_ = next;
+  previous_ = previous;
+  next_ = next;
 }
 
 template<class T>
@@ -39,7 +41,7 @@ inline
 Link<T>*
 Link<T>::next()
 {
-    return next_;
+  return next_;
 }
 
 template<class T>
@@ -47,49 +49,49 @@ inline
 Link<T>*
 Link<T>::previous()
 {
-    return previous_;
+  return previous_;
 }
 
 template<class T>
 inline
 void
-Link<T>::add( const T& thing )
+Link<T>::add (const T& thing)
 {
-    
-    Link<T>* l = new Link<T>( this, next_, thing );
-    if ( next_ )
-        next_->previous_ = l;
-    next_ = l;
+  
+  Link<T>* l = new Link<T>(this, next_, thing);
+  if (next_)
+    next_->previous_ = l;
+  next_ = l;
 }
 
 template<class T>
 inline void
-Link<T>::insert( const T& thing )
+Link<T>::insert (const T& thing)
 {
-    //    Link<T>* l = new Link<T>( next_, this, thing );
+  //    Link<T>* l = new Link<T>(next_, this, thing);
                                // bugfix hwn 16/9/96
-    Link<T>* l = new Link<T>( previous_, this, thing );
-    if ( previous_ )
-        previous_->next_ = l;
-    previous_ = l;
+  Link<T>* l = new Link<T>(previous_, this, thing);
+  if (previous_)
+    previous_->next_ = l;
+  previous_ = l;
 }
 
 /*
-    don't forget to adjust #l#'s top_ and bottom_.
-    */
+  don't forget to adjust #l#'s top_ and bottom_.
+  */
 template<class T>
 inline void
-Link<T>::remove(List<T> &l)
+Link<T>::remove (List<T> &l)
 {
-    if ( previous_ 
-        previous_->next_ = next_;
-    else 
-       l.top_ = next_;
+  if (previous_
+    previous_->next_ = next_;
+  else 
+    l.top_ = next_;
 
-    if ( next_ )
-        next_->previous_ = previous_;
-    else
-       l.bottom_ = previous_;
+  if (next_)
+    next_->previous_ = previous_;
+  else
+    l.bottom_ = previous_;
 }
 
 template<class T>
@@ -97,6 +99,6 @@ inline
 T&
 Link<T>::thing()
 {
-    return thing_;
+  return thing_;
 }
 #endif