Skip to content

Commit

Permalink
Remove deprecated std::binary_function
Browse files Browse the repository at this point in the history
  • Loading branch information
SoapZA committed Dec 15, 2023
1 parent 0ea2660 commit 5b3f4cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/api/algorithms/Sort.h
Expand Up @@ -60,9 +60,6 @@ struct API_EXPORT Sort
return false; // <-- unreachable
}

//! Base class for our sorting function objects
typedef std::binary_function<BamAlignment, BamAlignment, bool> AlignmentSortBase;

/*! \struct BamTools::Algorithms::Sort::ByName
\brief Function object for comparing alignments by name
Expand All @@ -79,7 +76,7 @@ struct API_EXPORT Sort
std::sort( a.begin(), a.end(), Sort::ByName(Sort::DescendingOrder) );
\endcode
*/
struct ByName : public AlignmentSortBase
struct ByName
{

// ctor
Expand Down Expand Up @@ -120,7 +117,7 @@ struct API_EXPORT Sort
std::sort( a.begin(), a.end(), Sort::ByPosition(Sort::DescendingOrder) );
\endcode
*/
struct ByPosition : public AlignmentSortBase
struct ByPosition
{

// ctor
Expand Down Expand Up @@ -177,7 +174,7 @@ struct API_EXPORT Sort
\endcode
*/
template <typename T>
struct ByTag : public AlignmentSortBase
struct ByTag
{

// ctor
Expand Down Expand Up @@ -227,7 +224,7 @@ struct API_EXPORT Sort
std::set<BamAlignment, Sort::Unsorted>; // STL set, unsorted (but probably insertion order)
\endcode
*/
struct Unsorted : public AlignmentSortBase
struct Unsorted
{

// comparison function
Expand Down
2 changes: 1 addition & 1 deletion src/api/internal/bam/BamMultiMerger_p.h
Expand Up @@ -49,7 +49,7 @@ struct API_NO_EXPORT MergeItem
};

template <typename Compare>
struct API_NO_EXPORT MergeItemSorter : public std::binary_function<MergeItem, MergeItem, bool>
struct API_NO_EXPORT MergeItemSorter
{

public:
Expand Down

0 comments on commit 5b3f4cf

Please sign in to comment.