2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

string_view refactor

This commit is contained in:
Jack Andersen
2017-11-12 20:19:18 -10:00
parent 742ab2514f
commit f7ec7bdc0c
345 changed files with 907 additions and 921 deletions

View File

@@ -46,7 +46,7 @@ public:
static void Initialize(const hecl::ProjectPath& path);
static void Shutdown();
CDvdFile(const char* path)
CDvdFile(std::string_view path)
: x18_path(path),
m_reader(std::make_shared<athena::io::FileReader>(
hecl::ProjectPath(m_DvdRoot, path).getAbsolutePath())) {}
@@ -55,7 +55,7 @@ public:
{
m_reader->seek(pos, athena::SeekOrigin::Begin);
}
static bool FileExists(const char* path)
static bool FileExists(std::string_view path)
{
return hecl::ProjectPath(m_DvdRoot, path).isFile();
}
@@ -79,7 +79,7 @@ public:
return m_reader->readBytesToBuf(buf, len);
}
u64 Length() {return m_reader->length();}
const std::string& GetPath() const { return x18_path; }
std::string_view GetPath() const { return x18_path; }
};
}