[keel,nostalgia/tools/pack,studio] Cleanup
This commit is contained in:
@@ -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;
|
||||
|
@@ -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;
|
||||
|
Reference in New Issue
Block a user