mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 06:09:50 -06:00
DolphinWX/Common: Change some find_first_of usages to find
It's unnecessary to use find_first_of when all you're searching for is a single character.
This commit is contained in:
@ -767,8 +767,10 @@ void CISOProperties::OnExtractFile(wxCommandEvent& WXUNUSED (event))
|
||||
|
||||
if (OpenISO->IsWiiDisc())
|
||||
{
|
||||
int partitionNum = wxAtoi(File.Mid(File.find_first_of("/") - 1, 1));
|
||||
File.erase(0, File.find_first_of("/") + 1); // Remove "Partition x/"
|
||||
size_t slash_index = File.find('/');
|
||||
int partitionNum = wxAtoi(File.Mid(slash_index - 1, 1));
|
||||
|
||||
File.erase(0, slash_index + 1); // Remove "Partition x/"
|
||||
WiiDisc.at(partitionNum).FileSystem->ExportFile(WxStrToStr(File), WxStrToStr(Path));
|
||||
}
|
||||
else
|
||||
@ -900,8 +902,10 @@ void CISOProperties::OnExtractDir(wxCommandEvent& event)
|
||||
|
||||
if (OpenISO->IsWiiDisc())
|
||||
{
|
||||
int partitionNum = wxAtoi(Directory.Mid(Directory.find_first_of("/") - 1, 1));
|
||||
Directory.erase(0, Directory.find_first_of("/") + 1); // Remove "Partition x/"
|
||||
size_t slash_index = Directory.find('/');
|
||||
int partitionNum = wxAtoi(Directory.Mid(slash_index - 1, 1));
|
||||
|
||||
Directory.erase(0, slash_index + 1); // Remove "Partition x/"
|
||||
ExportDir(WxStrToStr(Directory), WxStrToStr(Path), partitionNum);
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user