- do something about the mad cast disease.
authorRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Mon, 18 Jun 2001 16:03:31 +0000 (16:03 +0000)
committerRichard Kreckel <Richard.Kreckel@uni-mainz.de>
Mon, 18 Jun 2001 16:03:31 +0000 (16:03 +0000)
ginac/expairseq.cpp
ginac/function.pl

index 108d1e18d02d79533c2e5cce6f1ad7dd889fa30b..86f687de42879f3ba9c08238b1c16e51d8b904b0 100644 (file)
@@ -431,7 +431,7 @@ ex expairseq::derivative(const symbol &s) const
 int expairseq::compare_same_type(const basic &other) const
 {
        GINAC_ASSERT(is_of_type(other, expairseq));
-       const expairseq &o = static_cast<const expairseq &>(const_cast<basic &>(other));
+       const expairseq &o = static_cast<const expairseq &>(other);
        
        int cmpval;
        
@@ -496,7 +496,7 @@ int expairseq::compare_same_type(const basic &other) const
 
 bool expairseq::is_equal_same_type(const basic &other) const
 {
-       const expairseq &o = dynamic_cast<const expairseq &>(const_cast<basic &>(other));
+       const expairseq &o = static_cast<const expairseq &>(other);
        
        // compare number of elements
        if (seq.size()!=o.seq.size())
index a529f20e92bb413d9d816b4b4ad3322785d9e6c9..c3dbcd6f3bb3db8d74806eef325fe8a5ecd54438 100755 (executable)
@@ -885,7 +885,7 @@ ex function::derivative(const symbol & s) const
 int function::compare_same_type(const basic & other) const
 {
        GINAC_ASSERT(is_of_type(other, function));
-       const function & o=static_cast<function &>(const_cast<basic &>(other));
+       const function & o = static_cast<const function &>(other);
 
        if (serial!=o.serial) {
                return serial < o.serial ? -1 : 1;
@@ -896,7 +896,7 @@ int function::compare_same_type(const basic & other) const
 bool function::is_equal_same_type(const basic & other) const
 {
        GINAC_ASSERT(is_of_type(other, function));
-       const function & o=static_cast<function &>(const_cast<basic &>(other));
+       const function & o = static_cast<const function &>(other);
 
        if (serial!=o.serial) return false;
        return exprseq::is_equal_same_type(o);