From f2e6f555284a8d5f10b8bee5007cee2ab4a3b27d Mon Sep 17 00:00:00 2001 From: David Wells Date: Wed, 29 Jun 2016 22:14:07 -0400 Subject: [PATCH] Avoid using deprecated base classes. These classes were formally deprecated in C++11. --- source/grid/grid_reordering.cc | 100 ++++++++++++++++----------------- 1 file changed, 47 insertions(+), 53 deletions(-) diff --git a/source/grid/grid_reordering.cc b/source/grid/grid_reordering.cc index 37fd5f17c1..aee656654f 100644 --- a/source/grid/grid_reordering.cc +++ b/source/grid/grid_reordering.cc @@ -170,52 +170,6 @@ namespace internal - struct MSide::SideRectify : public std::unary_function - { - void operator() (MSide &s) const - { - if (s.v0>s.v1) - std::swap (s.v0, s.v1); - } - }; - - - struct MSide::SideSortLess : public std::binary_function - { - bool operator()(const MSide &s1, const MSide &s2) const - { - int s1vmin,s1vmax; - int s2vmin,s2vmax; - if (s1.v0s2vmin) - return false; - return s1vmax object. @@ -231,8 +185,12 @@ namespace internal /** * Wrapper class for the quadside() function */ - struct QuadSide: public std::binary_function,int,MSide> + struct QuadSide { + typedef CellData<2> first_argument_type; + typedef int second_argument_type; + typedef MSide result_type; + MSide operator()(const CellData<2> &q, int i) const { return quadside(q,i); @@ -301,6 +259,44 @@ namespace internal namespace { + void side_rectify (MSide &s) + { + if (s.v0>s.v1) + std::swap (s.v0, s.v1); + } + + bool side_sort_less(const MSide &s1, const MSide &s2) + { + int s1vmin,s1vmax; + int s2vmin,s2vmax; + if (s1.v0s2vmin) + return false; + return s1vmax