std::binary_function is deprecated and unnecessary in C++11
This commit is contained in:
@@ -16,6 +16,7 @@
|
|||||||
#include <ctime>
|
#include <ctime>
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <map>
|
#include <map>
|
||||||
|
#include <functional>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|||||||
+6
-9
@@ -91,8 +91,7 @@ typedef char* PSTR;
|
|||||||
|
|
||||||
// Standard headers needed
|
// Standard headers needed
|
||||||
#include <string> // basic_string
|
#include <string> // basic_string
|
||||||
#include <algorithm> // for_each, etc.
|
#include <algorithm> // for_each, etc.
|
||||||
#include <functional> // for StdStringLessNoCase, et al
|
|
||||||
|
|
||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
#include <malloc.h> // _alloca
|
#include <malloc.h> // _alloca
|
||||||
@@ -799,25 +798,23 @@ typedef CStdStr<char> CStdStringA; // a better std::string
|
|||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
// FUNCTIONAL COMPARATORS:
|
// FUNCTIONAL COMPARATORS:
|
||||||
// REMARKS:
|
// REMARKS:
|
||||||
// These structs are derived from the std::binary_function template. They
|
// These structs give us functional classes (which may be used in
|
||||||
// give us functional classes (which may be used in Standard C++ Library
|
// Standard C++ Library collections and algorithms) that perform
|
||||||
// collections and algorithms) that perform case-insensitive comparisons of
|
// case-insensitive comparisons of CStdString objects. This is
|
||||||
// CStdString objects. This is useful for maps in which the key may be the
|
// useful for maps in which the key may be the proper string but
|
||||||
// proper string but in the wrong case.
|
// in the wrong case.
|
||||||
// -----------------------------------------------------------------------------
|
// -----------------------------------------------------------------------------
|
||||||
|
|
||||||
#define StdStringLessNoCase SSLNCA
|
#define StdStringLessNoCase SSLNCA
|
||||||
#define StdStringEqualsNoCase SSENCA
|
#define StdStringEqualsNoCase SSENCA
|
||||||
|
|
||||||
struct StdStringLessNoCase
|
struct StdStringLessNoCase
|
||||||
: std::binary_function<CStdStringA, CStdStringA, bool>
|
|
||||||
{
|
{
|
||||||
inline
|
inline
|
||||||
bool operator()(const CStdStringA& sLeft, const CStdStringA& sRight) const
|
bool operator()(const CStdStringA& sLeft, const CStdStringA& sRight) const
|
||||||
{ return ssicmp(sLeft.c_str(), sRight.c_str()) < 0; }
|
{ return ssicmp(sLeft.c_str(), sRight.c_str()) < 0; }
|
||||||
};
|
};
|
||||||
struct StdStringEqualsNoCase
|
struct StdStringEqualsNoCase
|
||||||
: std::binary_function<CStdStringA, CStdStringA, bool>
|
|
||||||
{
|
{
|
||||||
inline
|
inline
|
||||||
bool operator()(const CStdStringA& sLeft, const CStdStringA& sRight) const
|
bool operator()(const CStdStringA& sLeft, const CStdStringA& sRight) const
|
||||||
|
|||||||
+1
-1
@@ -420,7 +420,7 @@ int TimingData::GetSegmentIndexAtRow(TimingSegmentType tst, int iRow ) const
|
|||||||
return INVALID_INDEX;
|
return INVALID_INDEX;
|
||||||
}
|
}
|
||||||
|
|
||||||
struct ts_less : binary_function <TimingSegment*, TimingSegment*, bool>
|
struct ts_less
|
||||||
{
|
{
|
||||||
bool operator() (const TimingSegment *x, const TimingSegment *y) const
|
bool operator() (const TimingSegment *x, const TimingSegment *y) const
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user