From: Richard Kreckel Date: Thu, 31 Dec 2015 18:34:54 +0000 (+0100) Subject: Make relational::rhs() and lhs() nonvirtual. X-Git-Tag: release_1-7-0~7^2~22 X-Git-Url: https://www.ginac.de/ginac.git//ginac.git?p=ginac.git;a=commitdiff_plain;h=13e428bf205c31f584ce6de03707c880e3486ade Make relational::rhs() and lhs() nonvirtual. I am unable to see a point in ever overriding these two member functions. --- 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: