mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/shared] Avoid container casting when possible
Change-Id: I646e605c88ad577ebd9102032aad77ff8eae6ad7
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#include "range_parameter_controller.h"
|
||||
#include "text_field_delegate_app.h"
|
||||
#include "../apps_container.h"
|
||||
#include <assert.h>
|
||||
|
||||
@@ -36,7 +37,7 @@ void RangeParameterController::willDisplayCellForIndex(TableViewCell * cell, int
|
||||
}
|
||||
|
||||
bool RangeParameterController::textFieldDidFinishEditing(TextField * textField, const char * text) {
|
||||
AppsContainer * appsContainer = (AppsContainer *)app()->container();
|
||||
AppsContainer * appsContainer = ((TextFieldDelegateApp *)app())->container();
|
||||
Context * globalContext = appsContainer->globalContext();
|
||||
float floatBody = Expression::parse(text)->approximate(*globalContext, appsContainer->preferences()->angleUnit());
|
||||
setParameterAtIndex(m_selectableTableView.selectedRow(), floatBody);
|
||||
|
||||
Reference in New Issue
Block a user