From dbe5df85c303a5b04e1922890d404f79b048e7fd Mon Sep 17 00:00:00 2001 From: Lev Nachmanson Date: Thu, 22 Feb 2018 08:44:50 -0800 Subject: [PATCH 1/2] fix the override warning Signed-off-by: Lev Nachmanson --- src/util/lp/dense_matrix.h | 6 +++--- src/util/lp/eta_matrix.h | 2 +- src/util/lp/lu.h | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/util/lp/dense_matrix.h b/src/util/lp/dense_matrix.h index 31b6617ac..e6663d705 100644 --- a/src/util/lp/dense_matrix.h +++ b/src/util/lp/dense_matrix.h @@ -82,10 +82,10 @@ public: void set_number_of_rows(unsigned /*m*/) override {} void set_number_of_columns(unsigned /*n*/) override {} - T get_elem(unsigned i, unsigned j) const { return m_values[i * m_n + j]; } + T get_elem(unsigned i, unsigned j) const override { return m_values[i * m_n + j]; } - unsigned row_count() const { return m_m; } - unsigned column_count() const { return m_n; } + unsigned row_count() const override { return m_m; } + unsigned column_count() const override { return m_n; } void set_elem(unsigned i, unsigned j, const T& val) { m_values[i * m_n + j] = val; } diff --git a/src/util/lp/eta_matrix.h b/src/util/lp/eta_matrix.h index eee4a2674..89d2e641d 100644 --- a/src/util/lp/eta_matrix.h +++ b/src/util/lp/eta_matrix.h @@ -83,7 +83,7 @@ public: void apply_from_right(vector & w) override; void apply_from_right(indexed_vector & w) override; - T get_elem(unsigned i, unsigned j) const; + T get_elem(unsigned i, unsigned j) const override; #ifdef Z3DEBUG unsigned row_count() const override { return m_length; } unsigned column_count() const override { return m_length; } diff --git a/src/util/lp/lu.h b/src/util/lp/lu.h index 2f9a5ec38..f2cae7961 100644 --- a/src/util/lp/lu.h +++ b/src/util/lp/lu.h @@ -78,10 +78,10 @@ public: void set_number_of_columns(unsigned n) override { m_m = n; m_n = n; } T m_one_over_val; - T get_elem (unsigned i, unsigned j) const; + T get_elem (unsigned i, unsigned j) const override; - unsigned row_count() const { return m_m; } // not defined } - unsigned column_count() const { return m_m; } // not defined } + unsigned row_count() const override { return m_m; } // not defined } + unsigned column_count() const override { return m_m; } // not defined } #endif void apply_from_left(vector & w, lp_settings &) override { w[m_i] /= m_val; From a238a0a37da800238b6ade73a2b5f5994109529a Mon Sep 17 00:00:00 2001 From: Lev Nachmanson Date: Thu, 22 Feb 2018 17:07:21 -0800 Subject: [PATCH 2/2] fix the build Signed-off-by: Lev Nachmanson --- src/util/lp/dense_matrix.h | 3 ++- src/util/lp/eta_matrix.h | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/util/lp/dense_matrix.h b/src/util/lp/dense_matrix.h index e6663d705..e2ee54058 100644 --- a/src/util/lp/dense_matrix.h +++ b/src/util/lp/dense_matrix.h @@ -81,8 +81,9 @@ public: void set_number_of_rows(unsigned /*m*/) override {} void set_number_of_columns(unsigned /*n*/) override {} - +#ifdef Z3DEBUG T get_elem(unsigned i, unsigned j) const override { return m_values[i * m_n + j]; } +#endif unsigned row_count() const override { return m_m; } unsigned column_count() const override { return m_n; } diff --git a/src/util/lp/eta_matrix.h b/src/util/lp/eta_matrix.h index 89d2e641d..abed6d06b 100644 --- a/src/util/lp/eta_matrix.h +++ b/src/util/lp/eta_matrix.h @@ -83,8 +83,8 @@ public: void apply_from_right(vector & w) override; void apply_from_right(indexed_vector & w) override; - T get_elem(unsigned i, unsigned j) const override; #ifdef Z3DEBUG + T get_elem(unsigned i, unsigned j) const override; unsigned row_count() const override { return m_length; } unsigned column_count() const override { return m_length; } void set_number_of_rows(unsigned m) override { m_length = m; }