[apps/shared] Inline and constify Interval helpers

This commit is contained in:
Émilie Feral
2019-08-29 17:44:02 +02:00
parent 8f8333c7ae
commit 2d5931b080
2 changed files with 4 additions and 16 deletions

View File

@@ -31,18 +31,6 @@ double Interval::element(int i) {
return m_intervalBuffer[i];
}
double Interval::start() {
return m_start;
}
double Interval::end() {
return m_end;
}
double Interval::step() {
return m_step;
}
void Interval::setStart(double f) {
m_start = f;
m_needCompute = true;

View File

@@ -11,9 +11,9 @@ public:
int numberOfElements();
void deleteElementAtIndex(int index);
double element(int i);
double start();
double end();
double step();
double start() const { return m_start; }
double end() const { return m_end; }
double step() const { return m_step; }
void setStart(double f);
void setEnd(double f);
void setStep(double f);
@@ -31,7 +31,7 @@ private:
};
typedef void (Interval::*SetterPointer)(double);
typedef double (Interval::*GetterPointer)();
typedef double (Interval::*GetterPointer)() const;
}