CDImageBin: Remove use of duplicated ReplaceExtension function

This commit is contained in:
Albert Liu 2020-09-26 15:38:46 -07:00
parent 8342fec2c8
commit 659e6a2e60
1 changed files with 1 additions and 12 deletions

View File

@ -25,17 +25,6 @@ private:
CDSubChannelReplacement m_sbi;
};
static std::string ReplaceExtension(std::string_view path, std::string_view new_extension)
{
std::string_view::size_type pos = path.rfind('.');
if (pos == std::string::npos)
return std::string(path);
std::string ret(path, 0, pos + 1);
ret.append(new_extension);
return ret;
}
CDImageBin::CDImageBin() = default;
CDImageBin::~CDImageBin()
@ -101,7 +90,7 @@ bool CDImageBin::Open(const char* filename)
AddLeadOutIndex();
m_sbi.LoadSBI(ReplaceExtension(filename, "sbi").c_str());
m_sbi.LoadSBI(FileSystem::ReplaceExtension(filename, "sbi").c_str());
return Seek(1, Position{0, 0, 0});
}