From 93e974068328d435792ade46e7488fe1009c6584 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Tue, 4 Jul 2017 20:27:18 +0200 Subject: [PATCH] Drop unnecessary check from FileSystemGCWii::FindFileInfo If the current file_info is a file, the ranged for loop will run 0 times, and we'll reach the last line of the function. --- Source/Core/DiscIO/FileSystemGCWii.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Source/Core/DiscIO/FileSystemGCWii.cpp b/Source/Core/DiscIO/FileSystemGCWii.cpp index 6abcc016e0..fca68113ba 100644 --- a/Source/Core/DiscIO/FileSystemGCWii.cpp +++ b/Source/Core/DiscIO/FileSystemGCWii.cpp @@ -277,10 +277,6 @@ std::unique_ptr FileSystemGCWii::FindFileInfo(const std::string& path, if (name_start == path.size()) return file_info.clone(); // We're done - // It's only possible to search in directories. Searching in a file is an error - if (!file_info.IsDirectory()) - return nullptr; - const size_t name_end = path.find('/', name_start); const std::string name = path.substr(name_start, name_end - name_start); const std::string rest_of_path = (name_end != std::string::npos) ? path.substr(name_end + 1) : "";