You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-04 12:00:25 +00:00
Merge pull request #90705 from AThousandShips/foreach_list
Reduce and prevent unnecessary random-access to `List`
This commit is contained in:
@@ -188,7 +188,7 @@ int test_main(int argc, char *argv[]) {
|
||||
}
|
||||
// Doctest runner.
|
||||
doctest::Context test_context;
|
||||
List<String> test_args;
|
||||
LocalVector<String> test_args;
|
||||
|
||||
// Clean arguments of "--test" from the args.
|
||||
for (int x = 0; x < argc; x++) {
|
||||
@@ -201,7 +201,7 @@ int test_main(int argc, char *argv[]) {
|
||||
if (test_args.size() > 0) {
|
||||
// Convert Godot command line arguments back to standard arguments.
|
||||
char **doctest_args = new char *[test_args.size()];
|
||||
for (int x = 0; x < test_args.size(); x++) {
|
||||
for (uint32_t x = 0; x < test_args.size(); x++) {
|
||||
// Operation to convert Godot string to non wchar string.
|
||||
CharString cs = test_args[x].utf8();
|
||||
const char *str = cs.get_data();
|
||||
@@ -213,7 +213,7 @@ int test_main(int argc, char *argv[]) {
|
||||
|
||||
test_context.applyCommandLine(test_args.size(), doctest_args);
|
||||
|
||||
for (int x = 0; x < test_args.size(); x++) {
|
||||
for (uint32_t x = 0; x < test_args.size(); x++) {
|
||||
delete[] doctest_args[x];
|
||||
}
|
||||
delete[] doctest_args;
|
||||
|
||||
Reference in New Issue
Block a user