]> https://gitweb.dealii.org/ - dealii.git/commitdiff
Make QuadComparator::operator() const.
authorWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 18 May 2001 09:23:08 +0000 (09:23 +0000)
committerWolfgang Bangerth <bangerth@math.tamu.edu>
Fri, 18 May 2001 09:23:08 +0000 (09:23 +0000)
git-svn-id: https://svn.dealii.org/trunk@4671 0785d39b-7218-0410-832d-ea1e28bc413d

deal.II/deal.II/source/grid/tria.cc

index c8fa763988ad6a16f4ff71f37223a7f4fb4e7ec0..e7c5ce4d7f555e7142d9713d5b7f67e83c30757b 100644 (file)
@@ -811,25 +811,26 @@ void Triangulation<2>::create_triangulation (const std::vector<Point<2> >    &v,
  * general Quad class.
  */
 struct QuadComparator {
-    bool operator () (const Quad &q1, const Quad &q2) {
-                                      // here is room to optimize the
-                                      // repeated equality test of
-                                      // the previous lines, but I don't
-                                      // care at present
-      if ((q1.line(0) < q2.line(0))          ||
-         ((q1.line(0) == q2.line(0)) &&
-          (q1.line(1) <  q2.line(1)))       ||
-         ((q1.line(0) == q2.line(0)) &&
-          (q1.line(1) == q2.line(1)) &&
-          (q1.line(2) <  q2.line(2)))       ||
-         ((q1.line(0) == q2.line(0)) &&
-          (q1.line(1) == q2.line(1)) &&
-          (q1.line(2) == q2.line(2)) &&
-          (q1.line(3) <  q2.line(3))))
-       return true;
-      else
-       return false;
-    };
+    inline bool operator () (const Quad &q1, const Quad &q2) const
+      {
+                                        // here is room to optimize the
+                                        // repeated equality test of
+                                        // the previous lines, but I don't
+                                        // care at present
+       if ((q1.line(0) < q2.line(0))          ||
+           ((q1.line(0) == q2.line(0)) &&
+            (q1.line(1) <  q2.line(1)))       ||
+           ((q1.line(0) == q2.line(0)) &&
+            (q1.line(1) == q2.line(1)) &&
+            (q1.line(2) <  q2.line(2)))       ||
+           ((q1.line(0) == q2.line(0)) &&
+            (q1.line(1) == q2.line(1)) &&
+            (q1.line(2) == q2.line(2)) &&
+            (q1.line(3) <  q2.line(3))))
+         return true;
+       else
+         return false;
+      };
 };
 
 

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.