mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-18 21:30:38 +01:00
[apps/shared/interval_parameter_controller] Assert interval() is not nullptr
and inline getter in header.
This commit is contained in:
@@ -1,5 +1,4 @@
|
||||
#include "interval_parameter_controller.h"
|
||||
#include <assert.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
@@ -33,10 +32,6 @@ void IntervalParameterController::willDisplayCellForIndex(HighlightCell * cell,
|
||||
FloatParameterController::willDisplayCellForIndex(cell, index);
|
||||
}
|
||||
|
||||
Interval * IntervalParameterController::interval() {
|
||||
return m_interval;
|
||||
}
|
||||
|
||||
double IntervalParameterController::parameterAtIndex(int index) {
|
||||
GetterPointer getters[k_totalNumberOfCell] = {&Interval::start, &Interval::end, &Interval::step};
|
||||
return (m_interval->*getters[index])();
|
||||
|
||||
@@ -4,13 +4,14 @@
|
||||
#include <escher.h>
|
||||
#include "interval.h"
|
||||
#include "float_parameter_controller.h"
|
||||
#include <assert.h>
|
||||
|
||||
namespace Shared {
|
||||
|
||||
class IntervalParameterController : public Shared::FloatParameterController<double> {
|
||||
public:
|
||||
IntervalParameterController(Responder * parentResponder, InputEventHandlerDelegate * inputEventHandlerDelegate, Interval * interval);
|
||||
Interval * interval();
|
||||
Interval * interval() { assert(m_interval); return m_interval; }
|
||||
const char * title() override;
|
||||
void setTitle(I18n::Message title) { m_title = title; }
|
||||
void willDisplayCellForIndex(HighlightCell * cell, int index) override;
|
||||
|
||||
Reference in New Issue
Block a user