]> https://gitweb.dealii.org/ - dealii-svn.git/commitdiff
Let Edge have a constructor. Avoid some warnings.
authorwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Mar 2003 01:03:48 +0000 (01:03 +0000)
committerwolf <wolf@0785d39b-7218-0410-832d-ea1e28bc413d>
Fri, 21 Mar 2003 01:03:48 +0000 (01:03 +0000)
git-svn-id: https://svn.dealii.org/trunk@7337 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/grid_reordering.cc

index 980091ded3a63aa36d99dea227a9e90618ed6ed5..67a45fad26440a58cf2fb6119e4b91e6d28e9b8a 100644 (file)
@@ -1212,6 +1212,12 @@ namespace internal
                                       */
     struct Edge 
     {
+        Edge (const unsigned int v0,
+              const unsigned int v1)
+                        :
+                        v0(v0), v1(v1)
+          {}
+        
         const unsigned int v0, v1;
         bool operator < (const Edge &e) const
           {
@@ -1230,10 +1236,10 @@ namespace internal
         {
                                            // construct the four edges
                                           // in reverse order
-          const Edge reverse_edges[4] = { { c->vertices[1], c->vertices[0] },
-                                          { c->vertices[2], c->vertices[1] },
-                                          { c->vertices[2], c->vertices[3] },
-                                          { c->vertices[3], c->vertices[0] } };
+          const Edge reverse_edges[4] = { Edge (c->vertices[1], c->vertices[0]),
+                                          Edge (c->vertices[2], c->vertices[1]),
+                                          Edge (c->vertices[2], c->vertices[3]),
+                                          Edge (c->vertices[3], c->vertices[0]) };
                                            // for each of them, check
                                            // whether they are already
                                            // in the set
@@ -1255,7 +1261,7 @@ namespace internal
                                            // duplicated by itself)
           for (unsigned int i=0; i<4; ++i)
            {
-             const Edge e = { reverse_edges[i].v1, reverse_edges[i].v0 };  
+             const Edge e(reverse_edges[i].v1, reverse_edges[i].v0);
              edges.insert (e);
            }
                                            // then go on with next

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.