From fc27636999a15f88b1f3b1d7101d84a67968ba06 Mon Sep 17 00:00:00 2001 From: Anilforextra Date: Wed, 2 Feb 2022 00:04:13 +0545 Subject: Vectors: Use clear() and has(). Use clear() instead of resize(0). Use has() instead of "find(p_val) != -1". --- editor/import/resource_importer_layered_texture.cpp | 2 +- editor/import/resource_importer_texture.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'editor/import') diff --git a/editor/import/resource_importer_layered_texture.cpp b/editor/import/resource_importer_layered_texture.cpp index 7ca61e83e7..d63366638e 100644 --- a/editor/import/resource_importer_layered_texture.cpp +++ b/editor/import/resource_importer_layered_texture.cpp @@ -517,7 +517,7 @@ bool ResourceImporterLayeredTexture::are_import_settings_valid(const String &p_p String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]); bool test = ProjectSettings::get_singleton()->get(setting_path); if (test) { - if (formats_imported.find(compression_formats[index]) == -1) { + if (!formats_imported.has(compression_formats[index])) { valid = false; break; } diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp index f21012258c..69c705ed5a 100644 --- a/editor/import/resource_importer_texture.cpp +++ b/editor/import/resource_importer_texture.cpp @@ -628,7 +628,7 @@ bool ResourceImporterTexture::are_import_settings_valid(const String &p_path) co String setting_path = "rendering/textures/vram_compression/import_" + String(compression_formats[index]); bool test = ProjectSettings::get_singleton()->get(setting_path); if (test) { - if (formats_imported.find(compression_formats[index]) == -1) { + if (!formats_imported.has(compression_formats[index])) { valid = false; break; } -- cgit v1.2.3