From 0dfbf3ade3d4a8fddb029559c249d7547b1a7c76 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Fri, 5 May 2017 16:37:37 +0200 Subject: [PATCH] [apps] Rule of 5 (2) Change-Id: I62eebed201a9f61b3f89233fda4e714f0bab0db7 --- apps/graph/app.cpp | 2 +- apps/graph/cartesian_function_store.cpp | 8 +++++--- apps/sequence/sequence.cpp | 11 +++++++++++ apps/sequence/sequence.h | 4 ++++ apps/sequence/sequence_store.cpp | 8 +++++--- apps/shared/function.cpp | 13 +++++++++++-- apps/shared/function.h | 8 ++++++-- 7 files changed, 43 insertions(+), 11 deletions(-) diff --git a/apps/graph/app.cpp b/apps/graph/app.cpp index 91393ddab..eb4e2c6a4 100644 --- a/apps/graph/app.cpp +++ b/apps/graph/app.cpp @@ -9,7 +9,7 @@ namespace Graph { App::App(Container * container, Context * context) : FunctionApp(container, &m_inputViewController, I18n::Message::FunctionApp, I18n::Message::FunctionAppCapital, ImageStore::GraphIcon), - m_functionStore(CartesianFunctionStore()), + m_functionStore(), m_xContext(VariableContext('x', context)), m_listController(ListController(&m_listFooter, &m_functionStore, &m_listHeader, &m_listFooter)), m_listFooter(ButtonRowController(&m_listHeader, &m_listController, &m_listController, ButtonRowController::Position::Bottom, ButtonRowController::Style::EmbossedGrey)), diff --git a/apps/graph/cartesian_function_store.cpp b/apps/graph/cartesian_function_store.cpp index fd7fc373c..bb87c6334 100644 --- a/apps/graph/cartesian_function_store.cpp +++ b/apps/graph/cartesian_function_store.cpp @@ -40,7 +40,7 @@ CartesianFunction * CartesianFunctionStore::addEmptyFunction() { assert(m_numberOfFunctions < k_maxNumberOfFunctions); const char * name = firstAvailableName(); KDColor color = firstAvailableColor(); - CartesianFunction addedFunction = CartesianFunction(name, color); + CartesianFunction addedFunction(name, color); m_functions[m_numberOfFunctions] = addedFunction; CartesianFunction * result = &m_functions[m_numberOfFunctions]; m_numberOfFunctions++; @@ -57,7 +57,8 @@ void CartesianFunctionStore::removeFunction(Shared::Function * f) { for (int j = i; j