]> www.ginac.de Git - ginac.git/blobdiff - ginsh/ginsh_parser.yy
removed a lot of superfluous const_cast<>()s
[ginac.git] / ginsh / ginsh_parser.yy
index 2e514778b27085a9d4db6f1bfbb30f86201f768a..98213e25e4282db6772e77dc0a8db51d57b70ef7 100644 (file)
@@ -208,7 +208,7 @@ exp : T_NUMBER              {$$ = $1;}
                }
        }
        | T_DIGITS '=' T_NUMBER {$$ = $3; Digits = ex_to<numeric>($3).to_int();}
-       | T_SYMBOL '=' exp      {$$ = $3; const_cast<symbol *>(&ex_to<symbol>($1))->assign($3);}
+       | T_SYMBOL '=' exp      {$$ = $3; ex_to_nonconst_symbol($1).assign($3);}
        | exp T_EQUAL exp       {$$ = $1 == $3;}
        | exp T_NOTEQ exp       {$$ = $1 != $3;}
        | exp '<' exp           {$$ = $1 < $3;}
@@ -468,7 +468,7 @@ static ex f_transpose(const exprseq &e)
 static ex f_unassign(const exprseq &e)
 {
        CHECK_ARG(0, symbol, unassign);
-       (const_cast<symbol *>(&ex_to<symbol>(e[0])))->unassign();
+       ex_to_nonconst_symbol(e[0]).unassign();
        return e[0];
 }