]> git.tdb.fi Git - builder.git/blobdiff - source/booleanevaluator.h
Use std::function instead of sigc::slot in BooleanEvaluator
[builder.git] / source / booleanevaluator.h
index 08ed432665bd48fd6822e2215b53b3adc2d3d6ca..7c2af6f1a0f9cbeb8d99d546c89d50172520e5a4 100644 (file)
@@ -1,17 +1,17 @@
 #ifndef BOOLEANEVALUATOR_H_
 #define BOOLEANEVALUATOR_H_
 
+#include <functional>
 #include <string>
 #include <vector>
-#include <sigc++/slot.h>
 
 class BooleanEvaluator
 {
 public:
-       typedef sigc::slot<bool, const std::string &, const std::string *> Slot;
+       using Function = std::function<bool(const std::string &, const std::string *)>;
 
 private:
-       Slot slot;
+       Function func;
        std::string ops;
        std::vector<std::string> var_stack;
        std::vector<unsigned char> value_stack;
@@ -19,7 +19,7 @@ private:
        bool last_was_op;
 
 public:
-       BooleanEvaluator(const Slot &, bool = true);
+       BooleanEvaluator(const Function &, bool = true);
 
        bool evaluate(const std::string &);
 private: