mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] variable_box_controller: avoid unused variable warning when DEBUG=0
This commit is contained in:
@@ -594,7 +594,6 @@ void VariableBoxController::loadCurrentVariablesInScript(const char * scriptCont
|
||||
// Keep only MP_TOKEN_NAME tokens
|
||||
if (lex->tok_kind == MP_TOKEN_NAME) {
|
||||
|
||||
const char * name = lex->vstr.buf;
|
||||
int nameLength = lex->vstr.len;
|
||||
|
||||
/* If the token autocompletes the text and it is not already in the
|
||||
@@ -612,7 +611,7 @@ void VariableBoxController::loadCurrentVariablesInScript(const char * scriptCont
|
||||
}
|
||||
assert(beginningLineIndex == line);
|
||||
const char * tokenInText = beginningLine + lex->tok_column - 1; // tok_column starts at 1, not 0
|
||||
assert(strncmp(tokenInText, name, nameLength) == 0);
|
||||
assert(strncmp(tokenInText, lex->vstr.buf, nameLength) == 0);
|
||||
|
||||
ScriptNode::Type nodeType = (defToken || *(tokenInText + nameLength) == '(')? ScriptNode::Type::WithParentheses : ScriptNode::Type::WithoutParentheses;
|
||||
if (addNodeIfMatches(textToAutocomplete, textToAutocompleteLength, nodeType, origin, tokenInText, nameLength)) {
|
||||
|
||||
Reference in New Issue
Block a user