[poincare] Replace the overriding of operator T() by an inline function

to cast Expression in Derived Expression
This commit is contained in:
Émilie Feral
2018-09-05 09:33:54 +02:00
parent c6237ab448
commit c762b31bc2
26 changed files with 132 additions and 136 deletions

View File

@@ -151,7 +151,7 @@ void VariableBoxController::ContentViewController::willDisplayCellForIndex(Highl
/* TODO: implement list contexts */
// TODO: handle matrix and scalar!
LayoutRef layoutR = layoutRefForIndex(index);
const Matrix matrixEvaluation = static_cast<Matrix>(evaluation);
const Matrix matrixEvaluation = static_cast<Matrix&>(evaluation);
myCell->setLayoutRef(layoutR);
char buffer[2*PrintFloat::bufferSizeForFloatsWithPrecision(2)+1];
int numberOfChars = PrintFloat::convertFloatToText<float>(matrixEvaluation.numberOfRows(), buffer, PrintFloat::bufferSizeForFloatsWithPrecision(2), 2, Preferences::PrintFloatMode::Decimal);