mirror of
https://github.com/Z3Prover/z3
synced 2025-07-25 13:47:01 +00:00
Add and fix a few general compiler warnings. (#5628)
* rewriter: fix unused variable warnings * cmake: make missing non-virtual dtors error * treewide: add missing virtual destructors * cmake: add a few more checks * api: add missing virtual destructor to user_propagator_base * examples: compile cpp example with compiler warnings * model: fix unused variable warnings * rewriter: fix logical-op-parentheses warnings * sat: fix unused variable warnings * smt: fix unused variable warnings
This commit is contained in:
parent
1d45a33163
commit
96671cfc73
39 changed files with 68 additions and 9 deletions
|
@ -270,6 +270,7 @@ public:
|
|||
class check_value {
|
||||
public:
|
||||
virtual bool operator()(Value const& v) = 0;
|
||||
virtual ~check_value() = default;
|
||||
};
|
||||
|
||||
bool find_le(Key const* keys, check_value& check) {
|
||||
|
|
|
@ -23,6 +23,7 @@ Revision History:
|
|||
namespace lp {
|
||||
class column_namer {
|
||||
public:
|
||||
virtual ~column_namer() = default;
|
||||
virtual std::string get_variable_name(unsigned j) const = 0;
|
||||
template <typename T>
|
||||
std::ostream & print_row(const row_strip<T> & row, std::ostream & out) const {
|
||||
|
|
|
@ -120,6 +120,8 @@ struct factorization_factory {
|
|||
m_vars(vars), m_monic(m) {
|
||||
}
|
||||
|
||||
virtual ~factorization_factory() = default;
|
||||
|
||||
bool_vector get_mask() const {
|
||||
// we keep the last element always in the first factor to avoid
|
||||
// repeating a pair twice, that is why m_mask is shorter by one then m_vars
|
||||
|
|
|
@ -99,6 +99,7 @@ template <typename X> bool is_epsilon_small(const X & v, const double& eps);
|
|||
|
||||
class lp_resource_limit {
|
||||
public:
|
||||
virtual ~lp_resource_limit() = default;
|
||||
virtual bool get_cancel_flag() = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -71,6 +71,7 @@ namespace polynomial {
|
|||
template<typename ValManager, typename Value = typename ValManager::numeral>
|
||||
class var2value {
|
||||
public:
|
||||
virtual ~var2value() = default;
|
||||
virtual ValManager & m() const = 0;
|
||||
virtual bool contains(var x) const = 0;
|
||||
virtual Value const & operator()(var x) const = 0;
|
||||
|
@ -100,6 +101,7 @@ namespace polynomial {
|
|||
|
||||
struct display_var_proc {
|
||||
virtual std::ostream& operator()(std::ostream & out, var x) const { return out << "x" << x; }
|
||||
virtual ~display_var_proc() = default;
|
||||
};
|
||||
|
||||
class polynomial;
|
||||
|
@ -228,6 +230,7 @@ namespace polynomial {
|
|||
del_eh * m_next;
|
||||
public:
|
||||
del_eh():m_next(nullptr) {}
|
||||
virtual ~del_eh() = default;
|
||||
virtual void operator()(polynomial * p) = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -175,6 +175,8 @@ namespace upolynomial {
|
|||
m_current_size = 0;
|
||||
}
|
||||
|
||||
virtual ~factorization_combination_iterator_base() = default;
|
||||
|
||||
/**
|
||||
\brief Returns the factors we are enumerating through.
|
||||
*/
|
||||
|
|
|
@ -37,6 +37,7 @@ namespace realclosure {
|
|||
|
||||
class mk_interval {
|
||||
public:
|
||||
virtual ~mk_interval() = default;
|
||||
virtual void operator()(unsigned k, mpqi_manager & im, mpqi_manager::interval & r) = 0;
|
||||
};
|
||||
|
||||
|
|
|
@ -42,6 +42,7 @@ public:
|
|||
};
|
||||
|
||||
struct display_var_proc {
|
||||
virtual ~display_var_proc() = default;
|
||||
virtual void operator()(std::ostream & out, var x) const { out << "x" << x; }
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue