Remove std::unary_function base class

Redundant, indeed deprecated, these days.
This commit is contained in:
Jez Higgins 2024-09-10 09:34:42 +01:00
parent 09ebc8baa3
commit 952e71da02
2 changed files with 6 additions and 6 deletions

View file

@ -25,10 +25,10 @@ namespace SimpleDOM
{
template<class stringT, class string_adaptorT>
class valueIs : public std::unary_function<AttrImpl<stringT, string_adaptorT>*, bool>
class valueIs
{
public:
valueIs(const stringT& value) : value_(value) { }
explicit valueIs(const stringT& value) : value_(value) { }
bool operator()(const AttrImpl<stringT, string_adaptorT>* node) const
{
return (node->getNodeValue() == value_);

View file

@ -13,13 +13,13 @@ namespace SimpleDOM
{
template<class stringT, class string_adaptorT>
class nameIs : public std::unary_function<Arabica::SimpleDOM::NodeImpl<stringT, string_adaptorT>*, bool>
class nameIs
{
public:
nameIs(const stringT& name) : name_(name) { }
explicit nameIs(const stringT& name) : name_(name) { }
bool operator()(const Arabica::SimpleDOM::NodeImpl<stringT, string_adaptorT>* node) const
{
return (node->getNodeName() == name_);
return node->getNodeName() == name_;
} // operator()
private:
@ -27,7 +27,7 @@ class nameIs : public std::unary_function<Arabica::SimpleDOM::NodeImpl<stringT,
}; // class nameIs
template<class stringT, class string_adaptorT>
class namespaceAndNameIs : public std::unary_function<NodeImpl<stringT, string_adaptorT>*, bool>
class namespaceAndNameIs
{
public:
namespaceAndNameIs(const stringT& namespaceURI, const stringT& localName) :