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;
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())
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;
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);