mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps/code] Replace if with assertion
This commit is contained in:
@@ -154,17 +154,11 @@ int VariableBoxController::typeAtLocation(int i, int j) {
|
||||
}
|
||||
|
||||
void VariableBoxController::loadFunctionsAndVariables(int scriptIndex, const char * textToAutocomplete, int textToAutocompleteLength) {
|
||||
assert(scriptIndex >= 0);
|
||||
|
||||
// Reset the node counts
|
||||
empty();
|
||||
|
||||
if (scriptIndex < 0) {
|
||||
/* If not script index is given, the variable box is loaded from console. We
|
||||
* only want to load imported script variables. */
|
||||
assert(textToAutocomplete == nullptr);
|
||||
loadVariablesImportedFromScripts();
|
||||
return;
|
||||
}
|
||||
|
||||
if (textToAutocomplete != nullptr && textToAutocompleteLength < 0) {
|
||||
textToAutocompleteLength = strlen(textToAutocomplete);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user