Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/algorithms/highlevel/chromaprinter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ void Chromaprinter::compute() {
// Copy the signal to new vector to expand it to the int16_t dynamic range before the cast.
std::vector<Real> signalScaled = signal;
std::transform(signalScaled.begin(), signalScaled.end(), signalScaled.begin(),
std::bind1st(std::multiplies<Real>(), pow(2,15)));
std::bind(std::multiplies<Real>(), pow(2,15), std::placeholders::_1));

std::vector<int16_t> signalCast(signalScaled.begin(), signalScaled.end());

Expand Down Expand Up @@ -160,7 +160,7 @@ AlgorithmStatus Chromaprinter::process() {
// Copy the signal to new vector to expand it to the int16_t dynamic range before the cast.
std::vector<Real> signalScaled = signal;
std::transform(signalScaled.begin(), signalScaled.end(), signalScaled.begin(),
std::bind1st(std::multiplies<Real>(), pow(2,15)));
std::bind(std::multiplies<Real>(), pow(2,15), std::placeholders::_1));

std::vector<int16_t> signalCast(signalScaled.begin(), signalScaled.end());

Expand Down
2 changes: 1 addition & 1 deletion src/essentia/essentiamath.h
Original file line number Diff line number Diff line change
Expand Up @@ -914,7 +914,7 @@ std::vector<T> derivative(const std::vector<T>& array) {
}

template<typename T, typename U, typename Comparator=std::greater<T> >
class PairCompare : public std::binary_function<T, U, bool> {
class PairCompare {
Comparator _cmp;
public:
bool operator () (const std::pair<T,U>& p1, const std::pair<T,U>& p2) const {
Expand Down
3 changes: 1 addition & 2 deletions src/essentia/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,7 @@ inline bool case_insensitive_char_cmp(char a, char b) {
/**
* Function object for comparing two strings in a case-insensitive manner.
*/
struct case_insensitive_str_cmp
: public std::binary_function<const std::string&, const std::string&, bool> {
struct case_insensitive_str_cmp {
bool operator()(const std::string& str1, const std::string& str2) const {
return std::lexicographical_compare(str1.begin(), str1.end(),
str2.begin(), str2.end(),
Expand Down
4 changes: 2 additions & 2 deletions src/essentia/utils/peak.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class Peak {
// the positions are equal it sorts by descending magnitude
template<typename Comp1=std::less<Real>,
typename Comp2=std::greater_equal<Real> >
class ComparePeakPosition : public std::binary_function<Real, Real, bool> {
class ComparePeakPosition {
Comp1 _cmp1;
Comp2 _cmp2;
public:
Expand All @@ -86,7 +86,7 @@ class ComparePeakPosition : public std::binary_function<Real, Real, bool> {
// the magnitudes are equal it sorts by ascending position
template<typename Comp1=std::greater<Real>,
typename Comp2=std::less_equal<Real> >
class ComparePeakMagnitude : public std::binary_function<Real, Real, bool> {
class ComparePeakMagnitude {
Comp1 _cmp1;
Comp2 _cmp2;
public:
Expand Down