mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/statistics] Clean BoxBannerView
This commit is contained in:
@@ -8,20 +8,13 @@ BoxBannerView::BoxBannerView() :
|
||||
{
|
||||
}
|
||||
|
||||
int BoxBannerView::numberOfSubviews() const {
|
||||
return 2;
|
||||
}
|
||||
|
||||
TextView * BoxBannerView::textViewAtIndex(int index) const {
|
||||
const TextView * textViews[2] = {&m_calculationName, &m_calculationValue};
|
||||
return (TextView *)textViews[index];
|
||||
}
|
||||
|
||||
MessageTextView * BoxBannerView::messageTextViewAtIndex(int index) const {
|
||||
if (index == 0) {
|
||||
return (MessageTextView *)&m_calculationName;
|
||||
}
|
||||
return nullptr;
|
||||
return index == 0 ? (MessageTextView *)&m_calculationName : nullptr;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@ class BoxBannerView : public Shared::BannerView {
|
||||
public:
|
||||
BoxBannerView();
|
||||
private:
|
||||
int numberOfSubviews() const override;
|
||||
int numberOfSubviews() const override { return 2; }
|
||||
TextView * textViewAtIndex(int i) const override;
|
||||
MessageTextView * messageTextViewAtIndex(int i) const override;
|
||||
MessageTextView m_calculationName;
|
||||
|
||||
Reference in New Issue
Block a user