[code] Get rid of unused member variable in VariableBoxController

This commit is contained in:
Émilie Feral
2019-03-12 14:43:18 +01:00
parent e1450676e0
commit f713551d46
3 changed files with 4 additions and 8 deletions

View File

@@ -84,7 +84,7 @@ App::App(Container * container, Snapshot * snapshot) :
m_listFooter(&m_codeStackViewController, &m_menuController, &m_menuController, ButtonRowController::Position::Bottom, ButtonRowController::Style::EmbossedGrey, ButtonRowController::Size::Large),
m_menuController(&m_listFooter, this, snapshot->scriptStore(), &m_listFooter),
m_codeStackViewController(&m_modalViewController, &m_listFooter),
m_variableBoxController(this, snapshot->scriptStore())
m_variableBoxController(snapshot->scriptStore())
{
}

View File

@@ -11,9 +11,8 @@
namespace Code {
VariableBoxController::VariableBoxController(App * pythonDelegate, ScriptStore * scriptStore) :
VariableBoxController::VariableBoxController(ScriptStore * scriptStore) :
NestedMenuController(nullptr, I18n::Message::FunctionsAndVariables),
m_pythonDelegate(pythonDelegate),
m_scriptNodesCount(0),
m_scriptStore(scriptStore)
{
@@ -34,7 +33,7 @@ void VariableBoxController::didEnterResponderChain(Responder * previousFirstResp
* environment where Python has already been inited. This way, we do not
* deinit Python when leaving the VariableBoxController, so we do not lose the
* environment that was loaded when entering the VariableBoxController. */
assert(m_pythonDelegate->pythonIsInited());
assert(static_cast<App *>(app())->pythonIsInited());
}
static bool shouldAddObject(const char * name, int maxLength) {

View File

@@ -8,11 +8,9 @@
namespace Code {
class App;
class VariableBoxController : public NestedMenuController {
public:
VariableBoxController(App * pythonDelegate, ScriptStore * scriptStore);
VariableBoxController(ScriptStore * scriptStore);
/* Responder */
bool handleEvent(Ion::Events::Event event) override;
@@ -36,7 +34,6 @@ private:
void insertTextInCaller(const char * text);
void addFunctionAtIndex(const char * functionName, int scriptIndex);
void addVariableAtIndex(const char * variableName, int scriptIndex);
App * m_pythonDelegate;
ScriptNode m_scriptNodes[k_maxScriptNodesCount];
int m_scriptNodesCount;
ScriptStore * m_scriptStore;