From 30e3f70446b7593ad25daeff5b9fc4a28df6a375 Mon Sep 17 00:00:00 2001
From: Ansgar Burchardt <Ansgar.Burchardt@tu-dresden.de>
Date: Thu, 31 Aug 2017 19:07:33 +0200
Subject: [PATCH] remove `MoveVector`

---
 gm/algebra.cc | 73 ---------------------------------------------------
 gm/algebra.h  |  1 -
 2 files changed, 74 deletions(-)

diff --git a/gm/algebra.cc b/gm/algebra.cc
index 5416adeb9..c62401856 100644
--- a/gm/algebra.cc
+++ b/gm/algebra.cc
@@ -4780,79 +4780,6 @@ void NS_DIM_PREFIX SetLevelnumberBV( BLOCKVECTOR *bv, INT level )
 
 #endif /* __BLOCK_VECTOR_DESC__ */
 
-/****************************************************************************/
-/** \brief Move vector within the vector list of the grid
-
- * @param theGrid - pointer to grid
- * @param moveVector - vector to move
- * @param destVector - vector before or after which 'moveVector' will be inserted
- * @param after - true (1) or false (0)
-
-   This function moves a 'VECTOR' within the double linked list. If 'after' is
-   true then 'moveVector' will be inserted immediately after 'destVector', if
-   'after' is false then it will be inserted immediately before. If 'destVector'
-   is 'NULL' then 'moveVector' is inserted at the beginning when 'after' is true
-   and at the end of the list when 'after' is false.
-
- * @return <ul>
- *   <li>    0 if ok </li>
- *   <li>    1 if error occured. </li>
- * </ul>
- */
-/****************************************************************************/
-
-INT NS_DIM_PREFIX MoveVector (GRID *theGrid, VECTOR *moveVector, VECTOR *destVector, INT after)
-{
-  if (theGrid==NULL || moveVector==NULL) return (1);
-  if (moveVector==destVector) return (0);
-
-  /* take vector out of list */
-  if (PREDVC(moveVector)!=NULL) SUCCVC(PREDVC(moveVector))      = SUCCVC(moveVector);
-  else SFIRSTVECTOR(theGrid)           = SUCCVC(moveVector);
-  if (SUCCVC(moveVector)!=NULL) PREDVC(SUCCVC(moveVector))      = PREDVC(moveVector);
-  else LASTVECTOR(theGrid)             = PREDVC(moveVector);
-
-  /* put it in list */
-  if (destVector!=NULL)
-  {
-    if (after)
-    {
-      if (SUCCVC(destVector)!=NULL) PREDVC(SUCCVC(destVector))      = moveVector;
-      else LASTVECTOR(theGrid)             = moveVector;
-      SUCCVC(moveVector) = SUCCVC(destVector);
-      PREDVC(moveVector) = destVector;
-      SUCCVC(destVector) = moveVector;
-    }
-    else
-    {
-      if (PREDVC(destVector)!=NULL) SUCCVC(PREDVC(destVector))      = moveVector;
-      else SFIRSTVECTOR(theGrid)           = moveVector;
-      PREDVC(moveVector) = PREDVC(destVector);
-      SUCCVC(moveVector) = destVector;
-      PREDVC(destVector) = moveVector;
-    }
-  }
-  else
-  {
-    if (after)
-    {
-      SUCCVC(moveVector) = SFIRSTVECTOR(theGrid);
-      PREDVC(moveVector) = NULL;
-      SFIRSTVECTOR(theGrid) = moveVector;
-      if (SUCCVC(moveVector)!=NULL) PREDVC(SUCCVC(moveVector)) = moveVector;
-    }
-    else
-    {
-      SUCCVC(moveVector) = NULL;
-      PREDVC(moveVector) = LASTVECTOR(theGrid);
-      LASTVECTOR(theGrid) = moveVector;
-      if (PREDVC(moveVector)!=NULL) SUCCVC(PREDVC(moveVector)) = moveVector;
-    }
-  }
-
-  return (0);
-}
-
 /****************************************************************************/
 /** \brief Init algebra
  *
diff --git a/gm/algebra.h b/gm/algebra.h
index 8a2085deb..9cee6df16 100644
--- a/gm/algebra.h
+++ b/gm/algebra.h
@@ -204,7 +204,6 @@ INT             MaxNextVectorClass                              (GRID *theGrid,
 /** @name Miscellaneous routines */
 /*@{*/
 INT             PrepareAlgebraModification              (MULTIGRID *theMG);
-INT             MoveVector                                              (GRID *theGrid, VECTOR *moveVector, VECTOR *destVector, INT after);
 /*@}*/
 
 /** \brief Initialization */
-- 
GitLab