]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Work around a problem in egcs1.1.2
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Aug 1999 15:35:14 +0000 (15:35 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Tue, 10 Aug 1999 15:35:14 +0000 (15:35 +0000)
git-svn-id: https://svn.dealii.org/trunk@1666 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/include/grid/tria_accessor.templates.h

index 3b94a84c31f3b088f254f217cba5173f31193e04..f1f5dcec9eb5514ba0acc18b615f8910acd49b24 100644 (file)
@@ -477,23 +477,31 @@ TriaIterator<dim,TriaObjectAccessor<1, dim> >
 TriaObjectAccessor<3, dim>::line (const unsigned int i) const {
   Assert (used(), ExcCellNotUsed());
   Assert (i<12, ExcIndexRange (i,0,12));
-  
+
+                                  // egcs 1.1.2 gets into trouble if we
+                                  // omit the this-> here, if one tries to
+                                  // inline this function into another
+                                  // function where the variable name
+                                  // quad is also used.. It then complains
+                                  // that the name look-up for
+                                  // for-loop-variables has changed. using
+                                  // this-> as here works around the problem
   if (i<4)
-    return quad(0)->line(i);
+    return this->quad(0)->line(i);
   else
     if (i<8)
-      return quad(1)->line(i-4);
+      return this->quad(1)->line(i-4);
     else
       switch (i) 
        {
          case 8:
-               return quad(2)->line(3);
+               return this->quad(2)->line(3);
          case 9:
-               return quad(2)->line(1);
+               return this->quad(2)->line(1);
          case 10:
-               return quad(4)->line(1);
+               return this->quad(4)->line(1);
          case 11:
-               return quad(4)->line(3);
+               return this->quad(4)->line(3);
        };
   Assert (false, ExcIndexRange(i,0,12));
   return TriaIterator<dim,TriaObjectAccessor<1, dim> >(tria, -1, -1, 0);

In the beginning the Universe was created. This has made a lot of people very angry and has been widely regarded as a bad move.

Douglas Adams


Typeset in Trocchi and Trocchi Bold Sans Serif.