mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-29 11:39:58 +02:00
[apps/shared] Avoid container casting when possible
Change-Id: I646e605c88ad577ebd9102032aad77ff8eae6ad7
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#include "calculation_controller.h"
|
||||
#include "../constant.h"
|
||||
#include "../apps_container.h"
|
||||
#include "app.h"
|
||||
#include <poincare.h>
|
||||
#include <assert.h>
|
||||
|
||||
@@ -90,7 +91,7 @@ void CalculationController::willDisplayCellAtLocation(TableViewCell * cell, int
|
||||
float calculation = (m_store->*calculationMethods[j])();
|
||||
EvenOddBufferTextCell * myCell = (EvenOddBufferTextCell *)cell;
|
||||
char buffer[Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits)];
|
||||
AppsContainer * container = (AppsContainer *)app()->container();
|
||||
AppsContainer * container = ((App *)app())->container();
|
||||
Complex::convertFloatToText(calculation, buffer, Complex::bufferSizeForFloatsWithPrecision(Constant::LargeNumberOfSignificantDigits), Constant::LargeNumberOfSignificantDigits, container->preferences()->displayMode());
|
||||
myCell->setText(buffer);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user