]> www.ginac.de Git - ginac.git/commitdiff
Make relational::rhs() and lhs() nonvirtual.
authorRichard Kreckel <kreckel@ginac.de>
Thu, 31 Dec 2015 18:34:54 +0000 (19:34 +0100)
committerRichard Kreckel <kreckel@ginac.de>
Thu, 31 Dec 2015 18:34:54 +0000 (19:34 +0100)
I am unable to see a point in ever overriding these two member functions.

ginac/relational.cpp
ginac/relational.h

index 38d0baf7c757230e1b586c09e716f9343202b185..fcb84eca779bf9e3151f52ea4b653383216be407 100644 (file)
@@ -290,17 +290,7 @@ unsigned relational::calchash() const
 // new virtual functions which can be overridden by derived classes
 //////////
 
 // 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
 
 //////////
 // non-virtual functions in this class
index 0c9d65a1a6b713a2ef1f74f038a37e3e51d023ba..9a753c1eef94a6c216d177258f3dc3b5e5454a2e 100644 (file)
@@ -76,8 +76,8 @@ protected:
        void do_print_python_repr(const print_python_repr & c, unsigned level) const;
 
 public:
        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:
 
        // non-virtual functions in this class
 private: