remove deprecated std::binary_function
This commit is contained in:
@@ -102,8 +102,7 @@ typedef MeshPointArray::_TConstIterator VertexIterator;
|
||||
* '==' operator of MeshPoint) we use the same operator when comparing the
|
||||
* points in the function object.
|
||||
*/
|
||||
struct Vertex_EqualTo : public std::binary_function<const VertexIterator&,
|
||||
const VertexIterator&, bool>
|
||||
struct Vertex_EqualTo
|
||||
{
|
||||
bool operator()(const VertexIterator& x,
|
||||
const VertexIterator& y) const
|
||||
@@ -116,8 +115,7 @@ struct Vertex_EqualTo : public std::binary_function<const VertexIterator&,
|
||||
}
|
||||
};
|
||||
|
||||
struct Vertex_Less : public std::binary_function<const VertexIterator&,
|
||||
const VertexIterator&, bool>
|
||||
struct Vertex_Less
|
||||
{
|
||||
bool operator()(const VertexIterator& x,
|
||||
const VertexIterator& y) const
|
||||
@@ -277,8 +275,7 @@ typedef MeshFacetArray::_TConstIterator FaceIterator;
|
||||
/*
|
||||
* The facet with the lowset index is regarded as 'less'.
|
||||
*/
|
||||
struct MeshFacet_Less : public std::binary_function<const FaceIterator&,
|
||||
const FaceIterator&, bool>
|
||||
struct MeshFacet_Less
|
||||
{
|
||||
bool operator()(const FaceIterator& x,
|
||||
const FaceIterator& y) const
|
||||
@@ -319,8 +316,7 @@ struct MeshFacet_Less : public std::binary_function<const FaceIterator&,
|
||||
* Two facets are equal if all its three point indices refer to the same
|
||||
* location in the point array of the mesh kernel they belong to.
|
||||
*/
|
||||
struct MeshFacet_EqualTo : public std::binary_function<const FaceIterator&,
|
||||
const FaceIterator&, bool>
|
||||
struct MeshFacet_EqualTo
|
||||
{
|
||||
bool operator()(const FaceIterator& x,
|
||||
const FaceIterator& y) const
|
||||
|
||||
@@ -1075,9 +1075,12 @@ inline bool MeshFacet::IsEqual (const MeshFacet& rcFace) const
|
||||
* Binary function to query the flags for use with generic STL functions.
|
||||
*/
|
||||
template <class TCLASS>
|
||||
class MeshIsFlag : public std::binary_function<TCLASS, typename TCLASS::TFlagType, bool>
|
||||
class MeshIsFlag
|
||||
{
|
||||
public:
|
||||
typedef TCLASS first_argument_type;
|
||||
typedef typename TCLASS::TFlagType second_argument_type;
|
||||
typedef bool result_type;
|
||||
bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const
|
||||
{ return rclElem.IsFlag(tFlag); }
|
||||
};
|
||||
@@ -1086,9 +1089,12 @@ public:
|
||||
* Binary function to query the flags for use with generic STL functions.
|
||||
*/
|
||||
template <class TCLASS>
|
||||
class MeshIsNotFlag : public std::binary_function<TCLASS, typename TCLASS::TFlagType, bool>
|
||||
class MeshIsNotFlag
|
||||
{
|
||||
public:
|
||||
typedef TCLASS first_argument_type;
|
||||
typedef typename TCLASS::TFlagType second_argument_type;
|
||||
typedef bool result_type;
|
||||
bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const
|
||||
{ return !rclElem.IsFlag(tFlag); }
|
||||
};
|
||||
@@ -1097,9 +1103,12 @@ public:
|
||||
* Binary function to set the flags for use with generic STL functions.
|
||||
*/
|
||||
template <class TCLASS>
|
||||
class MeshSetFlag : public std::binary_function<TCLASS, typename TCLASS::TFlagType, bool>
|
||||
class MeshSetFlag
|
||||
{
|
||||
public:
|
||||
typedef TCLASS first_argument_type;
|
||||
typedef typename TCLASS::TFlagType second_argument_type;
|
||||
typedef bool result_type;
|
||||
bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const
|
||||
{ rclElem.SetFlag(tFlag); return true; }
|
||||
};
|
||||
@@ -1108,9 +1117,12 @@ public:
|
||||
* Binary function to reset the flags for use with generic STL functions.
|
||||
*/
|
||||
template <class TCLASS>
|
||||
class MeshResetFlag : public std::binary_function<TCLASS, typename TCLASS::TFlagType, bool>
|
||||
class MeshResetFlag
|
||||
{
|
||||
public:
|
||||
typedef TCLASS first_argument_type;
|
||||
typedef typename TCLASS::TFlagType second_argument_type;
|
||||
typedef bool result_type;
|
||||
bool operator () (const TCLASS& rclElem, typename TCLASS::TFlagType tFlag) const
|
||||
{ rclElem.ResetFlag(tFlag); return true; }
|
||||
};
|
||||
|
||||
@@ -312,8 +312,7 @@ struct Edge_Index
|
||||
unsigned long p0, p1, f;
|
||||
};
|
||||
|
||||
struct Edge_Less : public std::binary_function<const Edge_Index&,
|
||||
const Edge_Index&, bool>
|
||||
struct Edge_Less
|
||||
{
|
||||
bool operator()(const Edge_Index& x, const Edge_Index& y) const
|
||||
{
|
||||
|
||||
@@ -119,8 +119,7 @@ struct QUAD {int iV[4];};
|
||||
|
||||
namespace MeshCore {
|
||||
|
||||
struct Color_Less : public std::binary_function<const App::Color&,
|
||||
const App::Color&, bool>
|
||||
struct Color_Less
|
||||
{
|
||||
bool operator()(const App::Color& x,
|
||||
const App::Color& y) const
|
||||
@@ -759,9 +758,12 @@ namespace MeshCore {
|
||||
enum Number {
|
||||
int8, uint8, int16, uint16, int32, uint32, float32, float64
|
||||
};
|
||||
struct Property : public std::binary_function<std::pair<std::string, Number>,
|
||||
std::string, bool>
|
||||
struct Property
|
||||
{
|
||||
typedef std::pair<std::string, int> first_argument_type;
|
||||
typedef std::string second_argument_type;
|
||||
typedef bool result_type;
|
||||
|
||||
bool operator()(const std::pair<std::string, int>& x,
|
||||
const std::string& y) const
|
||||
{
|
||||
|
||||
@@ -67,7 +67,7 @@ protected:
|
||||
inline bool TriangleCutsSphere (const MeshFacet &rclF) const;
|
||||
bool ExpandRadius (unsigned long ulMinPoints);
|
||||
|
||||
struct CDistRad : public std::binary_function<const Base::Vector3f&, const Base::Vector3f&, bool>
|
||||
struct CDistRad
|
||||
{
|
||||
CDistRad (const Base::Vector3f clCenter) : _clCenter(clCenter) {}
|
||||
bool operator()(const Base::Vector3f &rclPt1, const Base::Vector3f &rclPt2) { return Base::DistanceP2(_clCenter, rclPt1) < Base::DistanceP2(_clCenter, rclPt2); }
|
||||
|
||||
@@ -303,8 +303,7 @@ private:
|
||||
MeshKernel& _rclMesh;
|
||||
bool _needsCleanup;
|
||||
|
||||
struct Vertex_Less : public std::binary_function<const Base::Vector3f&,
|
||||
const Base::Vector3f&, bool>
|
||||
struct Vertex_Less
|
||||
{
|
||||
bool operator()(const Base::Vector3f& x, const Base::Vector3f& y) const;
|
||||
};
|
||||
@@ -344,8 +343,7 @@ public:
|
||||
|
||||
protected:
|
||||
// for sorting of elements
|
||||
struct CNofFacetsCompare : public std::binary_function<const std::vector<unsigned long>&,
|
||||
const std::vector<unsigned long>&, bool>
|
||||
struct CNofFacetsCompare
|
||||
{
|
||||
bool operator () (const std::vector<unsigned long> &rclC1,
|
||||
const std::vector<unsigned long> &rclC2)
|
||||
|
||||
@@ -598,7 +598,7 @@ bool QuasiDelaunayTriangulator::Triangulate()
|
||||
|
||||
namespace MeshCore {
|
||||
namespace Triangulation {
|
||||
struct Vertex2d_Less : public std::binary_function<const Base::Vector3f&, const Base::Vector3f&, bool>
|
||||
struct Vertex2d_Less
|
||||
{
|
||||
bool operator()(const Base::Vector3f& p, const Base::Vector3f& q) const
|
||||
{
|
||||
@@ -608,7 +608,7 @@ struct Vertex2d_Less : public std::binary_function<const Base::Vector3f&, const
|
||||
} else return p.x < q.x;
|
||||
}
|
||||
};
|
||||
struct Vertex2d_EqualTo : public std::binary_function<const Base::Vector3f&, const Base::Vector3f&, bool>
|
||||
struct Vertex2d_EqualTo
|
||||
{
|
||||
bool operator()(const Base::Vector3f& p, const Base::Vector3f& q) const
|
||||
{
|
||||
|
||||
@@ -415,8 +415,7 @@ void MeshFaceAddition::addFacetCallback(void * ud, SoEventCallback * n)
|
||||
|
||||
namespace MeshGui {
|
||||
// for sorting of elements
|
||||
struct NofFacetsCompare : public std::binary_function<const std::vector<unsigned long>&,
|
||||
const std::vector<unsigned long>&, bool>
|
||||
struct NofFacetsCompare
|
||||
{
|
||||
bool operator () (const std::vector<unsigned long> &rclC1,
|
||||
const std::vector<unsigned long> &rclC2)
|
||||
|
||||
Reference in New Issue
Block a user