Skip to content

Commit

Permalink
Fixes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Oct 18, 2024
1 parent b3990cc commit 0fb3e07
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -77,13 +77,12 @@ void ScriptImporter::importScript(std::string & scriptCode,
{
return first.idx_in_source < second.idx_in_source;
});
std::vector<CollectedScript> collectedScript;
collectedScript.reserve(optionIt->second.size());
//In order to continue compatibility with legacy implementation we must collect import scripts in forward direction
//but then replace in reverse direction (in order to keep consistency of positions)
collectImportScripts(optionIt->second, recursionDepth, collectedScript);
//Now replace the imported script bodies
replaceImportScripts(scriptCode, collectedScript);
std::vector<CollectedScript> collectedScripts;
collectedScripts.reserve(optionIt->second.size());
//In order to continue compatibility with legacy implementation
//we must collect import scripts in forward direction but then replace in reverse direction.
collectImportScripts(optionIt->second, recursionDepth, collectedScripts);
replaceImportScripts(scriptCode, collectedScripts);
}
}

Expand Down

0 comments on commit 0fb3e07

Please sign in to comment.