From 83b679fe5a4fdd00793060a66e9afe80ef35c23b Mon Sep 17 00:00:00 2001
From: Markus Blatt <mblatt@dune-project.org>
Date: Mon, 11 Apr 2005 15:14:52 +0000
Subject: [PATCH] Now uses SLListModifyIterator for inserting etries into and
 deleting entries from single linked list.

[[Imported from SVN: r1867]]
---
 istl/test/syncertest.cc | 9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

diff --git a/istl/test/syncertest.cc b/istl/test/syncertest.cc
index 70b68951b..5ab19df13 100644
--- a/istl/test/syncertest.cc
+++ b/istl/test/syncertest.cc
@@ -18,7 +18,7 @@ void deleteOverlapEntries(Dune::IndexSet<TG,Dune::ParallelLocalIndex<TA>,N>& ind
   typedef typename RemoteIndices::RemoteIndexList::iterator RemoteIterator;
   typedef Dune::SLList<TG, typename RemoteIndices::RemoteIndexList::Allocator> GlobalList;
   typedef typename GlobalList::iterator GlobalIterator;
-  typedef Dune::Tuple<RemoteIterator,RemoteIterator,GlobalIterator,const RemoteIterator> IteratorTuple;
+  typedef Dune::Tuple<RemoteIterator,RemoteIterator,const RemoteIterator> IteratorTuple;
   typedef std::map<int,IteratorTuple> IteratorMap;
   typedef typename RemoteIndices::RemoteIndexMap::iterator RemoteMapIterator;
 
@@ -43,7 +43,6 @@ void deleteOverlapEntries(Dune::IndexSet<TG,Dune::ParallelLocalIndex<TA>,N>& ind
     iterators.insert(std::make_pair(remote->first,
                                     IteratorTuple(remote->second.first->oneBeforeBegin(),
                                                   remote->second.first->begin(),
-                                                  gList.oneBeforeBegin(),
                                                   rend
                                                   )));
   }
@@ -64,15 +63,14 @@ void deleteOverlapEntries(Dune::IndexSet<TG,Dune::ParallelLocalIndex<TA>,N>& ind
       for(iterator remote = iterators.begin();
           remote != end; ++remote) {
         // Search for the index
-        while(Dune::Element<1>::get(remote->second) != Dune::Element<3>::get(remote->second)
+        while(Dune::Element<1>::get(remote->second) != Dune::Element<2>::get(remote->second)
               && Dune::Element<1>::get(remote->second)->localIndexPair().global() < index->global()) {
           // increment all iterators
           ++(Dune::Element<0>::get(remote->second));
           ++(Dune::Element<1>::get(remote->second));
-          ++(Dune::Element<2>::get(remote->second));
         }
         // Delete the entry if present
-        if(Dune::Element<1>::get(remote->second) != Dune::Element<3>::get(remote->second)
+        if(Dune::Element<1>::get(remote->second) != Dune::Element<2>::get(remote->second)
            && Dune::Element<1>::get(remote->second)->localIndexPair().global() == index->global()) {
           assert(&Dune::Element<1>::get(remote->second)->localIndexPair()==&(*index));
 
@@ -83,7 +81,6 @@ void deleteOverlapEntries(Dune::IndexSet<TG,Dune::ParallelLocalIndex<TA>,N>& ind
 
           // Delete entries
           Dune::Element<0>::get(remote->second).deleteNext();
-          Dune::Element<2>::get(remote->second).deleteNext();
         }
       }
     }
-- 
GitLab