diff --git a/poincare/src/power.cpp b/poincare/src/power.cpp index b48fbf826..d2b59bcb9 100644 --- a/poincare/src/power.cpp +++ b/poincare/src/power.cpp @@ -898,7 +898,7 @@ bool Power::parentIsALogarithmOfSameBase() const { bool Power::isNthRootOfUnity() const { // We check we are equal to e^(i*pi) or e^(i*pi*rational) - if (childAtIndex(0).type() != ExpressionNode::Type::Symbol || childAtIndex(0).convert().name() != Ion::Charset::Exponential) { + if (childAtIndex(0).type() != ExpressionNode::Type::Symbol || !childAtIndex(0).convert().isExponential()) { return false; } if (childAtIndex(1).type() != ExpressionNode::Type::Multiplication) { @@ -908,11 +908,11 @@ bool Power::isNthRootOfUnity() const { return false; } const Expression i = childAtIndex(1).childAtIndex(childAtIndex(1).numberOfChildren()-1); - if (i.type() != ExpressionNode::Type::Symbol || static_cast(i).name() != Ion::Charset::IComplex) { + if (i.type() != ExpressionNode::Type::Symbol || !static_cast(i).isIComplex()) { return false; } const Expression pi = childAtIndex(1).childAtIndex(childAtIndex(1).numberOfChildren()-2); - if (pi.type() != ExpressionNode::Type::Symbol || static_cast(pi).name() != Ion::Charset::SmallPi) { + if (pi.type() != ExpressionNode::Type::Symbol || !static_cast(pi).isPi()) { return false; } if (numberOfChildren() == 2) {