diff options
Diffstat (limited to 'thirdparty/openxr/src/loader/api_layer_interface.cpp')
-rw-r--r-- | thirdparty/openxr/src/loader/api_layer_interface.cpp | 30 |
1 files changed, 14 insertions, 16 deletions
diff --git a/thirdparty/openxr/src/loader/api_layer_interface.cpp b/thirdparty/openxr/src/loader/api_layer_interface.cpp index c9e24ec40b..5560c31a52 100644 --- a/thirdparty/openxr/src/loader/api_layer_interface.cpp +++ b/thirdparty/openxr/src/loader/api_layer_interface.cpp @@ -237,23 +237,21 @@ XrResult ApiLayerInterface::LoadApiLayers(const std::string& openxr_command, uin for (const auto& layer_name : enabled_explicit_api_layer_names) { bool found_this_layer = false; - if (layers_already_found.count(layer_name) > 0) { - found_this_layer = true; - } else { - for (auto it = explicit_layer_manifest_files.begin(); it != explicit_layer_manifest_files.end();) { - bool erased_layer_manifest_file = false; - - if (layer_name == (*it)->LayerName()) { - found_this_layer = true; - layers_already_found.insert(layer_name); - enabled_layer_manifest_files_in_init_order.push_back(std::move(*it)); - it = explicit_layer_manifest_files.erase(it); - erased_layer_manifest_file = true; - } + for (auto it = explicit_layer_manifest_files.begin(); it != explicit_layer_manifest_files.end();) { + bool erased_layer_manifest_file = false; + + if (layers_already_found.count(layer_name) > 0) { + found_this_layer = true; + } else if (layer_name == (*it)->LayerName()) { + found_this_layer = true; + layers_already_found.insert(layer_name); + enabled_layer_manifest_files_in_init_order.push_back(std::move(*it)); + it = explicit_layer_manifest_files.erase(it); + erased_layer_manifest_file = true; + } - if (!erased_layer_manifest_file) { - it++; - } + if (!erased_layer_manifest_file) { + it++; } } |