From 0fb3e07a0c950fb110c829382f684bd42cad26a4 Mon Sep 17 00:00:00 2001 From: Thomas Ubensee <34603111+tomuben@users.noreply.github.com> Date: Fri, 18 Oct 2024 14:25:12 -0300 Subject: [PATCH] Fixes from review --- .../script_options/parser_ctpg_script_importer.cc | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/exaudfclient/base/javacontainer/script_options/parser_ctpg_script_importer.cc b/exaudfclient/base/javacontainer/script_options/parser_ctpg_script_importer.cc index 4cf9860a..84dfb708 100644 --- a/exaudfclient/base/javacontainer/script_options/parser_ctpg_script_importer.cc +++ b/exaudfclient/base/javacontainer/script_options/parser_ctpg_script_importer.cc @@ -77,13 +77,12 @@ void ScriptImporter::importScript(std::string & scriptCode, { return first.idx_in_source < second.idx_in_source; }); - std::vector 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 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); } }