[apps/escher] Share color selection for data (Red, blue, Green, Yellow)

This commit is contained in:
Léa Saviot
2018-05-29 14:03:22 +02:00
parent df9be81ce7
commit 47fa6f4a41
13 changed files with 40 additions and 54 deletions

View File

@@ -8,7 +8,6 @@ extern "C" {
namespace Graph {
constexpr int CartesianFunctionStore::k_maxNumberOfFunctions;
constexpr KDColor CartesianFunctionStore::k_defaultColors[k_maxNumberOfFunctions];
constexpr const char * CartesianFunctionStore::k_functionNames[k_maxNumberOfFunctions];
CartesianFunctionStore::CartesianFunctionStore() :
@@ -89,22 +88,6 @@ const char * CartesianFunctionStore::firstAvailableName() {
return k_functionNames[0];
}
const KDColor CartesianFunctionStore::firstAvailableColor() {
for (int k = 0; k < k_maxNumberOfFunctions; k++) {
int j = 0;
while (j < m_numberOfFunctions) {
if (m_functions[j].color() == k_defaultColors[k]) {
break;
}
j++;
}
if (j == m_numberOfFunctions) {
return k_defaultColors[k];
}
}
return k_defaultColors[0];
}
void CartesianFunctionStore::removeAll() {
for (int i = 0; i < m_numberOfFunctions; i++) {
CartesianFunction emptyFunction("", KDColorBlack);