[keel,nostalgia/tools/pack,studio] Cleanup

This commit is contained in:
2023-11-30 21:45:03 -06:00
parent 68a0dd9660
commit 0fc7e7005c
7 changed files with 30 additions and 33 deletions

View File

@@ -6,14 +6,14 @@
namespace keel {
TypeStore::TypeStore(ox::FileSystem *fs, ox::String descPath) noexcept:
TypeStore::TypeStore(ox::FileSystem &fs, ox::String descPath) noexcept:
m_fs(fs),
m_descPath(std::move(descPath)) {
}
ox::Result<ox::UniquePtr<ox::DescriptorType>> TypeStore::loadDescriptor(ox::CRStringView typeId) noexcept {
auto path = ox::sfmt("{}/{}", m_descPath, typeId);
oxRequire(buff, m_fs->read(path));
oxRequire(buff, m_fs.read(path));
auto dt = ox::make_unique<ox::DescriptorType>();
oxReturnError(ox::readClaw<ox::DescriptorType>(buff, dt.get()));
return dt;

View File

@@ -12,11 +12,11 @@ namespace keel {
class TypeStore: public ox::TypeStore {
private:
ox::FileSystem *m_fs = nullptr;
ox::FileSystem &m_fs;
ox::String m_descPath;
public:
explicit TypeStore(ox::FileSystem *fs, ox::String descPath) noexcept;
explicit TypeStore(ox::FileSystem &fs, ox::String descPath) noexcept;
protected:
ox::Result<ox::UniquePtr<ox::DescriptorType>> loadDescriptor(ox::CRStringView typeId) noexcept override;