]> git.lyx.org Git - features.git/blobdiff - src/frontends/controllers/ControlMath.C
Make some functors adaptable and related small stuff.
[features.git] / src / frontends / controllers / ControlMath.C
index dccfdce253f310fd39db6ce86c7c25acc240fa6f..fa848a34f8ef95987df5d0eb63481a5f71f2ed04 100644 (file)
@@ -288,10 +288,10 @@ bool operator<(XPMmap const & lhs, XPMmap const & rhs)
 }
 
 
-struct CompareKey {
+struct CompareKey : public std::unary_function<XPMmap, bool> {
        CompareKey(string const & name) : name_(name) {}
-       bool operator()(XPMmap const & other) {
-               return compare(other.key, name_.c_str()) == 0;
+       bool operator()(XPMmap const & other) const {
+               return other.key == name_;
        }
 private:
        string const name_;