Commit f8c3dba5 authored by Tristan Matthews's avatar Tristan Matthews
Browse files

* #26839: nameComparator: don't inherit from deprecated unary_function

We are using neither nameComparator::argument_type nor
nameComparator::result_type so there's no need to inherit. This
fixes -Weffc++ warnings.
parent 34b93aee
......@@ -61,13 +61,15 @@ typedef struct PaDeviceInfos {
/**
* Unary function to search for a device by name in a list using std functions.
*/
struct nameComparator : public std::unary_function<const PaDeviceInfos, bool>
class nameComparator
{
explicit nameComparator(const std::string &ref) : baseline(ref) {}
bool operator() (const PaDeviceInfos &arg) {
return arg.name == baseline;
}
const std::string &baseline;
public:
explicit nameComparator(const std::string &ref) : baseline(ref) {}
bool operator() (const PaDeviceInfos &arg) {
return arg.name == baseline;
}
private:
const std::string &baseline;
};
} PaDeviceInfos;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment