From 13e428bf205c31f584ce6de03707c880e3486ade Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Thu, 31 Dec 2015 19:34:54 +0100 Subject: [PATCH] Make relational::rhs() and lhs() nonvirtual. I am unable to see a point in ever overriding these two member functions. --- ginac/relational.cpp | 12 +----------- ginac/relational.h | 4 ++-- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/ginac/relational.cpp b/ginac/relational.cpp index 38d0baf7..fcb84eca 100644 --- a/ginac/relational.cpp +++ b/ginac/relational.cpp @@ -290,17 +290,7 @@ unsigned relational::calchash() const // new virtual functions which can be overridden by derived classes ////////// -/** Left hand side of relational. */ -ex relational::lhs() const -{ - return lh; -} - -/** Right hand side of relational. */ -ex relational::rhs() const -{ - return rh; -} +// none ////////// // non-virtual functions in this class diff --git a/ginac/relational.h b/ginac/relational.h index 0c9d65a1..9a753c1e 100644 --- a/ginac/relational.h +++ b/ginac/relational.h @@ -76,8 +76,8 @@ protected: void do_print_python_repr(const print_python_repr & c, unsigned level) const; public: - virtual ex lhs() const; - virtual ex rhs() const; + ex lhs() const { return lh; } + ex rhs() const { return rh; } // non-virtual functions in this class private: -- 2.49.0