[ox] Cleanup unnecessary namespace specifications
This commit is contained in:
@@ -24,11 +24,11 @@ struct StatInfo {
|
||||
|
||||
template<typename size_t>
|
||||
struct OX_PACKED FileStoreItem: public ptrarith::Item<size_t> {
|
||||
ox::LittleEndian<size_t> id = 0;
|
||||
ox::LittleEndian<uint8_t> fileType = 0;
|
||||
ox::LittleEndian<size_t> links = 0;
|
||||
ox::LittleEndian<size_t> left = 0;
|
||||
ox::LittleEndian<size_t> right = 0;
|
||||
LittleEndian<size_t> id = 0;
|
||||
LittleEndian<uint8_t> fileType = 0;
|
||||
LittleEndian<size_t> links = 0;
|
||||
LittleEndian<size_t> left = 0;
|
||||
LittleEndian<size_t> right = 0;
|
||||
|
||||
FileStoreItem() = default;
|
||||
|
||||
@@ -65,8 +65,8 @@ class FileStoreTemplate {
|
||||
static constexpr auto MaxInode = MaxValue<size_t> / 2;
|
||||
|
||||
struct OX_PACKED FileStoreData {
|
||||
ox::LittleEndian<size_t> rootNode = 0;
|
||||
ox::Random random;
|
||||
LittleEndian<size_t> rootNode = 0;
|
||||
Random random;
|
||||
};
|
||||
|
||||
size_t m_buffSize = 0;
|
||||
|
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);
|
||||
}
|
||||
|
12
deps/ox/src/ox/fs/ptrarith/nodebuffer.hpp
vendored
12
deps/ox/src/ox/fs/ptrarith/nodebuffer.hpp
vendored
@@ -20,9 +20,9 @@ class OX_PACKED NodeBuffer {
|
||||
|
||||
public:
|
||||
struct OX_PACKED Header {
|
||||
ox::LittleEndian<size_t> size = sizeof(Header); // capacity
|
||||
ox::LittleEndian<size_t> bytesUsed = sizeof(Header);
|
||||
ox::LittleEndian<size_t> firstItem = 0;
|
||||
LittleEndian<size_t> size = sizeof(Header); // capacity
|
||||
LittleEndian<size_t> bytesUsed = sizeof(Header);
|
||||
LittleEndian<size_t> firstItem = 0;
|
||||
};
|
||||
|
||||
using ItemPtr = Ptr<Item, size_t, sizeof(Header)>;
|
||||
@@ -435,11 +435,11 @@ uint8_t *NodeBuffer<size_t, Item>::data() noexcept {
|
||||
template<typename size_t>
|
||||
struct OX_PACKED Item {
|
||||
public:
|
||||
ox::LittleEndian<size_t> prev = 0;
|
||||
ox::LittleEndian<size_t> next = 0;
|
||||
LittleEndian<size_t> prev = 0;
|
||||
LittleEndian<size_t> next = 0;
|
||||
|
||||
private:
|
||||
ox::LittleEndian<size_t> m_size = sizeof(Item);
|
||||
LittleEndian<size_t> m_size = sizeof(Item);
|
||||
|
||||
public:
|
||||
size_t size() const {
|
||||
|
Reference in New Issue
Block a user