diff --git a/examples/example.cpp b/examples/example.cpp index e81b5646..89cb2311 100644 --- a/examples/example.cpp +++ b/examples/example.cpp @@ -13,7 +13,7 @@ // limitations under the License. #include -#include "../include/find_embedding.hpp" +#include "../include/find_embedding/find_embedding.hpp" class MyCppInteractions : public find_embedding::LocalInteraction { public: @@ -21,7 +21,8 @@ class MyCppInteractions : public find_embedding::LocalInteraction { void cancel() { _canceled = true; } private: - virtual void displayOutputImpl(const std::string& mess) const { std::cout << mess << std::endl; } + void displayOutputImpl(const std::string& mess) const override { std::cout << mess << std::endl; } + void displayErrorImpl(const std::string& mess) const override { std::cout << mess << std::endl; } virtual bool cancelledImpl() const { return _canceled; } }; diff --git a/include/find_embedding/find_embedding.hpp b/include/find_embedding/find_embedding.hpp index 6f61374d..3b6b3b7c 100644 --- a/include/find_embedding/find_embedding.hpp +++ b/include/find_embedding/find_embedding.hpp @@ -85,8 +85,8 @@ class parameter_processor { vector _filter_fixed_vars() { vector unscrew(num_vars); - assert(var_fixed_unscrewed.size() == num_vars); - assert(num_fixed < num_vars); + iszero(var_fixed_unscrewed.size() == num_vars); + iszero(num_fixed < num_vars); for (unsigned int i = 0, front = 0, back = num_vars - num_fixed; i < num_vars; i++) { if (var_fixed_unscrewed[i]) { unscrew[back++] = i; diff --git a/include/find_embedding/util.hpp b/include/find_embedding/util.hpp index e4c50927..8adbe16f 100644 --- a/include/find_embedding/util.hpp +++ b/include/find_embedding/util.hpp @@ -94,10 +94,10 @@ class LocalInteraction { public: virtual ~LocalInteraction() {} //! Print a message through the local output method - void displayOutput(int loglevel, const string& msg) const { displayOutputImpl(loglevel, msg); } + void displayOutput(int loglevel, const string& msg) const { displayOutputImpl(msg); } //! Print an error through the local output method - void displayError(int loglevel, const string& msg) const { displayErrorImpl(loglevel, msg); } + void displayError(int loglevel, const string& msg) const { displayErrorImpl(msg); } //! Check if someone is trying to cancel the embedding process int cancelled(const clock::time_point stoptime) const { @@ -108,10 +108,10 @@ class LocalInteraction { private: //! Print the string to a binding specified sink - virtual void displayOutputImpl(int loglevel, const string&) const = 0; + virtual void displayOutputImpl(const string&) const = 0; //! Print the error to a binding specified sink - virtual void displayErrorImpl(int loglevel, const string&) const = 0; + virtual void displayErrorImpl(const string&) const = 0; //! Check if the embedding process has timed out. virtual bool timedOutImpl(const clock::time_point stoptime) const { return clock::now() >= stoptime; }