mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-19 22:00:28 +01:00
[apps] Avoid switch() {} when possible.
Change-Id: I4e050dcb761fe5ca6a12af375537f3554f324f68
This commit is contained in:
@@ -17,15 +17,8 @@ int EditExpressionController::ContentView::numberOfSubviews() const {
|
||||
}
|
||||
|
||||
View * EditExpressionController::ContentView::subviewAtIndex(int index) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
return m_mainView;
|
||||
case 1:
|
||||
return &m_textField;
|
||||
default:
|
||||
assert(false);
|
||||
return nullptr;
|
||||
}
|
||||
View * views[2] = {m_mainView, &m_textField};
|
||||
return views[index];
|
||||
}
|
||||
|
||||
void EditExpressionController::ContentView::layoutSubviews() {
|
||||
|
||||
Reference in New Issue
Block a user