summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/tests/gdscript_test_runner.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2024-05-07 09:04:44 +0200
committerRémi Verschelde <rverschelde@gmail.com>2024-05-07 09:04:44 +0200
commite63252b4219680d109bfa41c24f483e97b37f40e (patch)
tree8b8af6d7efcab9b2692d45dec65449fd83d2c8b9 /modules/gdscript/tests/gdscript_test_runner.cpp
parent570220ba9b127325f1a5aa7bb17d5c6f76ccf62c (diff)
parent955d5affa857ec1f358c56da8fb1ff4ab6590704 (diff)
downloadredot-engine-e63252b4219680d109bfa41c24f483e97b37f40e.tar.gz
Merge pull request #90705 from AThousandShips/foreach_list
Reduce and prevent unnecessary random-access to `List`
Diffstat (limited to 'modules/gdscript/tests/gdscript_test_runner.cpp')
-rw-r--r--modules/gdscript/tests/gdscript_test_runner.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/gdscript/tests/gdscript_test_runner.cpp b/modules/gdscript/tests/gdscript_test_runner.cpp
index e3d16eaf42..a949c44d78 100644
--- a/modules/gdscript/tests/gdscript_test_runner.cpp
+++ b/modules/gdscript/tests/gdscript_test_runner.cpp
@@ -573,7 +573,7 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
const List<GDScriptParser::ParserError> &errors = parser.get_errors();
if (!errors.is_empty()) {
// Only the first error since the following might be cascading.
- result.output += errors[0].message + "\n"; // TODO: line, column?
+ result.output += errors.front()->get().message + "\n"; // TODO: line, column?
}
if (!p_is_generating) {
result.passed = check_output(result.output);
@@ -592,7 +592,7 @@ GDScriptTest::TestResult GDScriptTest::execute_test_code(bool p_is_generating) {
const List<GDScriptParser::ParserError> &errors = parser.get_errors();
if (!errors.is_empty()) {
// Only the first error since the following might be cascading.
- result.output += errors[0].message + "\n"; // TODO: line, column?
+ result.output += errors.front()->get().message + "\n"; // TODO: line, column?
}
if (!p_is_generating) {
result.passed = check_output(result.output);