[ox] Cleanup unnecessary namespace specifications
This commit is contained in:
2
deps/ox/src/ox/fs/filesystem/filesystem.cpp
vendored
2
deps/ox/src/ox/fs/filesystem/filesystem.cpp
vendored
@@ -56,7 +56,7 @@ Error FileSystem::read(const FileAddress &addr, std::size_t readStart, std::size
|
||||
}
|
||||
}
|
||||
|
||||
Result<Vector<String>> FileSystem::ls(const ox::String &dir) noexcept {
|
||||
Result<Vector<String>> FileSystem::ls(const String &dir) noexcept {
|
||||
return ls(dir.c_str());
|
||||
}
|
||||
|
||||
|
2
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
2
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
@@ -50,7 +50,7 @@ class FileSystem {
|
||||
|
||||
Result<const char*> directAccess(const FileAddress &addr) noexcept;
|
||||
|
||||
Result<Vector<String>> ls(const ox::String &dir) noexcept;
|
||||
Result<Vector<String>> ls(const String &dir) noexcept;
|
||||
|
||||
virtual Result<Vector<String>> ls(const char *dir) noexcept = 0;
|
||||
|
||||
|
@@ -23,7 +23,7 @@ PassThroughFS::PassThroughFS(const char *dirPath) {
|
||||
PassThroughFS::~PassThroughFS() {
|
||||
}
|
||||
|
||||
ox::String PassThroughFS::basePath() {
|
||||
String PassThroughFS::basePath() {
|
||||
return m_path.string().c_str();
|
||||
}
|
||||
|
||||
@@ -101,7 +101,7 @@ Result<Vector<String>> PassThroughFS::ls(const char *dir) noexcept {
|
||||
oxReturnError(OxError(ec.value(), "PassThroughFS: ls failed"));
|
||||
for (auto &p : di) {
|
||||
auto u8p = p.path().filename().u8string();
|
||||
out.emplace_back(ox::bit_cast<const char*>(u8p.c_str()));
|
||||
out.emplace_back(bit_cast<const char*>(u8p.c_str()));
|
||||
}
|
||||
return ox::move(out);
|
||||
}
|
||||
|
@@ -35,7 +35,7 @@ class PassThroughFS: public FileSystem {
|
||||
~PassThroughFS();
|
||||
|
||||
[[nodiscard]]
|
||||
ox::String basePath();
|
||||
String basePath();
|
||||
|
||||
Error mkdir(const char *path, bool recursive = false) noexcept override;
|
||||
|
||||
@@ -95,7 +95,7 @@ Error PassThroughFS::ls(const char *dir, F cb) noexcept {
|
||||
oxReturnError(OxError(ec.value(), "PassThroughFS: ls failed"));
|
||||
for (auto &p : di) {
|
||||
auto u8p = p.path().filename().u8string();
|
||||
oxReturnError(cb(ox::bit_cast<const char*>(u8p.c_str()), 0));
|
||||
oxReturnError(cb(bit_cast<const char*>(u8p.c_str()), 0));
|
||||
}
|
||||
return OxError(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user