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.
This commit is contained in:
JosJuice 2017-07-04 20:27:18 +02:00
parent 6a31d2598e
commit 93e9740683
1 changed files with 0 additions and 4 deletions

View File

@ -277,10 +277,6 @@ std::unique_ptr<FileInfo> 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) : "";