mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[code] Avoid dynamic allocation and useless string copy by keeping the
importation status flag in the areaBuffer
This commit is contained in:
@@ -57,9 +57,10 @@ void App::Snapshot::setOpt(const char * name, char * value) {
|
||||
}
|
||||
*separator = 0;
|
||||
const char * scriptName = value;
|
||||
const char * scriptContent = separator+1;
|
||||
const char * scriptContent = separator;
|
||||
Code::ScriptTemplate script(scriptName, scriptContent);
|
||||
m_scriptStore.addScriptFromTemplate(&script);
|
||||
m_scriptStore.scriptNamed(scriptName).toggleImportationStatus(); // set Importation Status to 1
|
||||
return;
|
||||
}
|
||||
if (strcmp(name, "lock-on-console") == 0) {
|
||||
|
||||
Reference in New Issue
Block a user