From a53edf52022cda65d863614a8659e767cb0125e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9a=20Saviot?= Date: Wed, 6 May 2020 11:34:05 +0200 Subject: [PATCH] [apps/code] Remove TODOs --- apps/code/variable_box_controller.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/apps/code/variable_box_controller.cpp b/apps/code/variable_box_controller.cpp index 5e650112b..d99e7aa9c 100644 --- a/apps/code/variable_box_controller.cpp +++ b/apps/code/variable_box_controller.cpp @@ -624,7 +624,6 @@ void VariableBoxController::loadCurrentVariablesInScript(const char * scriptCont * nameLength are temporary variables that will be overriden when the * lexer continues lexing or is destroyed. * This was found from stepping in the code and trying. */ - // TODO LEA FIXME for (int i = 0; i < 3; i++) { if (strncmp(tokenInText, name, nameLength) != 0) { tokenInText--; @@ -773,10 +772,10 @@ bool VariableBoxController::addNodesFromImportMaybe(mp_parse_node_struct_t * par assert(numberOfModuleChildren > numberOfNodesToSkip); for (int i = numberOfNodesToSkip; i < numberOfModuleChildren; i++) { const char * name = I18n::translate((moduleChildren + i)->label()); - checkAndAddNode(textToAutocomplete, textToAutocompleteLength, ScriptNode::Type::WithoutParentheses, NodeOrigin::Importation, name, -1, importationSourceName, I18n::translate((moduleChildren + i)->text()) /*TODO LEA text or label?*/); + checkAndAddNode(textToAutocomplete, textToAutocompleteLength, ScriptNode::Type::WithoutParentheses, NodeOrigin::Importation, name, -1, importationSourceName, I18n::translate((moduleChildren + i)->text())); } } else { - //TODO LEA get module variables that are not in the toolbox + //TODO get module variables that are not in the toolbox } } else { // Try fetching the nodes from a script @@ -921,7 +920,7 @@ bool VariableBoxController::shouldAddNode(const char * textToAutocomplete, int t bool VariableBoxController::contains(const char * name, int nameLength) { assert(nameLength > 0); bool alreadyInVarBox = false; - // TODO LEA speed this up with dichotomia? + // This could be faster with dichotomia, but there is no speed problem for now NodeOrigin origins[] = {NodeOrigin::CurrentScript, NodeOrigin::Builtins, NodeOrigin::Importation}; for (NodeOrigin origin : origins) { const int nodesCount = nodesCountForOrigin(origin);