diff --git a/apps/calculation/calculation_store.h b/apps/calculation/calculation_store.h index ec9fa81be..d8f436fad 100644 --- a/apps/calculation/calculation_store.h +++ b/apps/calculation/calculation_store.h @@ -16,7 +16,7 @@ public: void deleteAll(); int numberOfCalculations(); private: - static constexpr int k_maxNumberOfCalculations = 20; + static constexpr int k_maxNumberOfCalculations = 10; Calculation * m_start; Calculation m_calculations[k_maxNumberOfCalculations]; }; diff --git a/apps/graph/cartesian_function_store.cpp b/apps/graph/cartesian_function_store.cpp index bb87c6334..9f72f83ac 100644 --- a/apps/graph/cartesian_function_store.cpp +++ b/apps/graph/cartesian_function_store.cpp @@ -7,8 +7,8 @@ extern "C" { namespace Graph { -constexpr int CartesianFunctionStore::k_numberOfDefaultColors; -constexpr KDColor CartesianFunctionStore::k_defaultColors[k_numberOfDefaultColors]; +constexpr int CartesianFunctionStore::k_maxNumberOfFunctions; +constexpr KDColor CartesianFunctionStore::k_defaultColors[k_maxNumberOfFunctions]; constexpr const char * CartesianFunctionStore::k_functionNames[k_maxNumberOfFunctions]; CartesianFunctionStore::CartesianFunctionStore() : @@ -86,7 +86,7 @@ const char * CartesianFunctionStore::firstAvailableName() { } const KDColor CartesianFunctionStore::firstAvailableColor() { - for (int k = 0; k < k_numberOfDefaultColors; k++) { + for (int k = 0; k < k_maxNumberOfFunctions; k++) { int j = 0; while (j < m_numberOfFunctions) { if (m_functions[j].color() == k_defaultColors[k]) { diff --git a/apps/graph/cartesian_function_store.h b/apps/graph/cartesian_function_store.h index 0d146e2b8..69fccd36d 100644 --- a/apps/graph/cartesian_function_store.h +++ b/apps/graph/cartesian_function_store.h @@ -20,17 +20,17 @@ public: int maxNumberOfFunctions() override; char symbol() const override; void removeAll() override; - static constexpr int k_maxNumberOfFunctions = 8; + static constexpr int k_maxNumberOfFunctions = 4; private: const char * firstAvailableName() override; const KDColor firstAvailableColor() override; - static constexpr int k_numberOfDefaultColors = 8; - static constexpr KDColor k_defaultColors[k_numberOfDefaultColors] = { + static constexpr KDColor k_defaultColors[k_maxNumberOfFunctions] = { Palette::Red, Palette::Blue, Palette::YellowDark, Palette::Magenta, - Palette::Pink, Palette::Turquoise, Palette::Orange, Palette::Green + //Palette::Pink, Palette::Turquoise, Palette::Orange, Palette::Green }; static constexpr const char * k_functionNames[k_maxNumberOfFunctions] = { - "f", "g", "h", "p", "q", "r", "s", "t" + "f", "g", "h", "p", + //"q", "r", "s", "t" }; CartesianFunction m_functions[k_maxNumberOfFunctions]; }; diff --git a/apps/sequence/list/list_controller.h b/apps/sequence/list/list_controller.h index 55ea1b86f..23455776a 100644 --- a/apps/sequence/list/list_controller.h +++ b/apps/sequence/list/list_controller.h @@ -41,7 +41,7 @@ private: View * loadView() override; void unloadView(View * view) override; static constexpr KDCoordinate k_emptySubRowHeight = 30; - constexpr static int k_maxNumberOfRows = 9; + constexpr static int k_maxNumberOfRows = 3*SequenceStore::k_maxNumberOfSequences; SequenceStore * m_sequenceStore; SequenceTitleCell * m_sequenceTitleCells[k_maxNumberOfRows]; Shared::FunctionExpressionCell * m_expressionCells[k_maxNumberOfRows]; diff --git a/apps/sequence/sequence_store.h b/apps/sequence/sequence_store.h index 05f9c4583..42cfa9d93 100644 --- a/apps/sequence/sequence_store.h +++ b/apps/sequence/sequence_store.h @@ -21,14 +21,14 @@ public: const char * firstAvailableName() override; char symbol() const override; void removeAll() override; - static constexpr int k_maxNumberOfSequences = 3; + static constexpr int k_maxNumberOfSequences = 2; private: const KDColor firstAvailableColor() override; static constexpr KDColor k_defaultColors[k_maxNumberOfSequences] = { - Palette::Red, Palette::Blue, Palette::YellowDark + Palette::Red, Palette::Blue//, Palette::YellowDark }; static constexpr const char * k_sequenceNames[k_maxNumberOfSequences] = { - "u", "v", "w" + "u", "v"//, "w" }; Sequence m_sequences[k_maxNumberOfSequences]; }; diff --git a/escher/include/escher/text_field.h b/escher/include/escher/text_field.h index 5afb1cb71..1440e7383 100644 --- a/escher/include/escher/text_field.h +++ b/escher/include/escher/text_field.h @@ -60,7 +60,7 @@ protected: KDCoordinate charWidth(); void deleteCharPrecedingCursor(); View * subviewAtIndex(int index) override; - constexpr static int k_maxBufferSize = 100; + constexpr static int k_maxBufferSize = 50; private: int numberOfSubviews() const override; void layoutSubviews() override;