From 5fc0922748250f2ce620a4fd46508011b6d7adde Mon Sep 17 00:00:00 2001 From: Richard Kreckel Date: Mon, 18 Jun 2001 16:03:31 +0000 Subject: [PATCH] - do something about the mad cast disease. --- ginac/expairseq.cpp | 4 ++-- ginac/function.pl | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ginac/expairseq.cpp b/ginac/expairseq.cpp index 108d1e18..86f687de 100644 --- a/ginac/expairseq.cpp +++ b/ginac/expairseq.cpp @@ -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_cast(other)); + const expairseq &o = static_cast(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_cast(other)); + const expairseq &o = static_cast(other); // compare number of elements if (seq.size()!=o.seq.size()) diff --git a/ginac/function.pl b/ginac/function.pl index a529f20e..c3dbcd6f 100755 --- a/ginac/function.pl +++ b/ginac/function.pl @@ -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(const_cast(other)); + const function & o = static_cast(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(const_cast(other)); + const function & o = static_cast(other); if (serial!=o.serial) return false; return exprseq::is_equal_same_type(o); -- 2.44.0