From: Wolfgang Bangerth Date: Fri, 18 May 2001 09:23:08 +0000 (+0000) Subject: Make QuadComparator::operator() const. X-Git-Tag: v8.0.0~19123 X-Git-Url: https://gitweb.dealii.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0c467fc6a7abad03198d021cc5e439a589dd27f9;p=dealii.git Make QuadComparator::operator() const. git-svn-id: https://svn.dealii.org/trunk@4671 0785d39b-7218-0410-832d-ea1e28bc413d --- diff --git a/deal.II/deal.II/source/grid/tria.cc b/deal.II/deal.II/source/grid/tria.cc index c8fa763988..e7c5ce4d7f 100644 --- a/deal.II/deal.II/source/grid/tria.cc +++ b/deal.II/deal.II/source/grid/tria.cc @@ -811,25 +811,26 @@ void Triangulation<2>::create_triangulation (const std::vector > &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; + }; };