From 0c467fc6a7abad03198d021cc5e439a589dd27f9 Mon Sep 17 00:00:00 2001 From: Wolfgang Bangerth Date: Fri, 18 May 2001 09:23:08 +0000 Subject: [PATCH] Make QuadComparator::operator() const. git-svn-id: https://svn.dealii.org/trunk@4671 0785d39b-7218-0410-832d-ea1e28bc413d --- deal.II/deal.II/source/grid/tria.cc | 39 +++++++++++++++-------------- 1 file changed, 20 insertions(+), 19 deletions(-) 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; + }; }; -- 2.39.5