diff --git a/tests/framework/icd/test_icd.cpp b/tests/framework/icd/test_icd.cpp index 466293a55..1cc964c35 100644 --- a/tests/framework/icd/test_icd.cpp +++ b/tests/framework/icd/test_icd.cpp @@ -1723,7 +1723,7 @@ bool should_check(std::vector* exts, VkDevice device, const char* e } PFN_vkVoidFunction get_device_func(VkDevice device, const char* pName) { - std::vector* enabled_extensions; + std::vector* enabled_extensions = nullptr; FindDevice found_device{}; if (device != nullptr) { found_device = lookup_device(device); diff --git a/tests/framework/util/folder_manager.cpp b/tests/framework/util/folder_manager.cpp index c406309ed..53bbba661 100644 --- a/tests/framework/util/folder_manager.cpp +++ b/tests/framework/util/folder_manager.cpp @@ -187,20 +187,18 @@ FileSystemManager::FileSystemManager() fs::Folder& FileSystemManager::get_folder(ManifestLocation location) noexcept { return folders.at(location); } fs::Folder const& FileSystemManager::get_folder(ManifestLocation location) const noexcept { return folders.at(location); } -Folder* FileSystemManager::get_folder_for_given_path(std::filesystem::path const& given_path) noexcept { - auto normalized_path = given_path.lexically_normal(); +Folder* FileSystemManager::get_folder_for_given_path(std::string_view given_path) noexcept { for (auto const& [manifest_location, folder] : folders) { - if (folder.location() == normalized_path) { + if (folder.location() == given_path) { return &folders.at(manifest_location); } } - if (redirected_paths.count(given_path.string()) > 0) { - return &folders.at(redirected_paths.at(normalized_path.string())); - } - for (auto const& [redirected_path_str, redirected_location] : redirected_paths) { - std::filesystem::path redirected_path = redirected_path_str; + for (auto const& [redirected_path, redirected_location] : redirected_paths) { + if (redirected_path == given_path) { + return &folders.at(redirected_location); + } const auto mismatch_pair = - std::mismatch(normalized_path.begin(), normalized_path.end(), redirected_path.begin(), redirected_path.end()); + std::mismatch(given_path.begin(), given_path.end(), redirected_path.begin(), redirected_path.end()); if (mismatch_pair.second == redirected_path.end()) return &folders.at(redirected_location); } return nullptr; diff --git a/tests/framework/util/folder_manager.h b/tests/framework/util/folder_manager.h index 68e69c211..9d405cbb3 100644 --- a/tests/framework/util/folder_manager.h +++ b/tests/framework/util/folder_manager.h @@ -28,6 +28,7 @@ #include #include +#include #include #include @@ -87,7 +88,7 @@ class FileSystemManager { Folder const& get_folder(ManifestLocation location) const noexcept; // Gets a pointer to the folder that given_path points to. This includes redirected paths as well as the exact path of folders - Folder* get_folder_for_given_path(std::filesystem::path const& given_path) noexcept; + Folder* get_folder_for_given_path(std::string_view given_path) noexcept; bool is_folder_path(std::filesystem::path const& path) const noexcept;