[ox/fs] Add ox::Buffer constructor to FileSystemTemplate
This commit is contained in:
parent
1f78ea1f37
commit
ebb8b12c4e
7
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
7
deps/ox/src/ox/fs/filesystem/filesystem.hpp
vendored
@ -165,6 +165,8 @@ class FileSystemTemplate: public MemFS {
|
|||||||
|
|
||||||
FileSystemTemplate(void *buffer, uint64_t bufferSize, void(*freeBuffer)(char*) = detail::fsBuffFree) noexcept;
|
FileSystemTemplate(void *buffer, uint64_t bufferSize, void(*freeBuffer)(char*) = detail::fsBuffFree) noexcept;
|
||||||
|
|
||||||
|
explicit FileSystemTemplate(ox::Buffer &buffer) noexcept;
|
||||||
|
|
||||||
explicit FileSystemTemplate(FileStore fs) noexcept;
|
explicit FileSystemTemplate(FileStore fs) noexcept;
|
||||||
|
|
||||||
~FileSystemTemplate() noexcept override;
|
~FileSystemTemplate() noexcept override;
|
||||||
@ -238,6 +240,11 @@ FileSystemTemplate<FileStore, Directory>::FileSystemTemplate(FileStore fs) noexc
|
|||||||
m_fs = fs;
|
m_fs = fs;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
template<typename FileStore, typename Directory>
|
||||||
|
FileSystemTemplate<FileStore, Directory>::FileSystemTemplate(ox::Buffer &buffer) noexcept:
|
||||||
|
m_fs(buffer.data(), static_cast<std::size_t>(buffer.size())) {
|
||||||
|
}
|
||||||
|
|
||||||
template<typename FileStore, typename Directory>
|
template<typename FileStore, typename Directory>
|
||||||
FileSystemTemplate<FileStore, Directory>::FileSystemTemplate(void *buffer, uint64_t bufferSize, void(*freeBuffer)(char*)) noexcept:
|
FileSystemTemplate<FileStore, Directory>::FileSystemTemplate(void *buffer, uint64_t bufferSize, void(*freeBuffer)(char*)) noexcept:
|
||||||
m_fs(buffer, static_cast<std::size_t>(bufferSize)),
|
m_fs(buffer, static_cast<std::size_t>(bufferSize)),
|
||||||
|
Loading…
Reference in New Issue
Block a user