[apps/graph/values] Enable to delete row by row

Change-Id: I25b14091711af3d7afd64413839a2664fc98a051
This commit is contained in:
Émilie Feral
2017-01-03 15:30:45 +01:00
parent 176cd6d539
commit eb976ad0cf
3 changed files with 15 additions and 1 deletions

View File

@@ -16,6 +16,14 @@ int Interval::numberOfElements() {
return m_numberOfElements;
}
void Interval::deleteElementAtIndex(int index) {
m_numberOfElements--;
for (int k = index; k < m_numberOfElements; k++) {
m_intervalBuffer[k] = m_intervalBuffer[k+1];
}
m_intervalBuffer[m_numberOfElements] = 0.0f;
}
float Interval::element(int i) {
assert(i >= 0 && i < numberOfElements());
computeElements();