summaryrefslogtreecommitdiffstats
path: root/src/core/file_sys/archive_backend.h
diff options
context:
space:
mode:
authorYuri Kunde Schlesner <yuriks@yuriks.net>2016-09-19 03:01:46 +0200
committerYuri Kunde Schlesner <yuriks@yuriks.net>2016-09-19 06:14:25 +0200
commit396a8d91a4423d9c793eeff0798d544613647511 (patch)
treee0203961233db1ffcbbca2e15154d71d142c5822 /src/core/file_sys/archive_backend.h
parentTweak formatting settings (diff)
downloadyuzu-396a8d91a4423d9c793eeff0798d544613647511.tar
yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.gz
yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.bz2
yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.lz
yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.xz
yuzu-396a8d91a4423d9c793eeff0798d544613647511.tar.zst
yuzu-396a8d91a4423d9c793eeff0798d544613647511.zip
Diffstat (limited to 'src/core/file_sys/archive_backend.h')
-rw-r--r--src/core/file_sys/archive_backend.h36
1 files changed, 17 insertions, 19 deletions
diff --git a/src/core/file_sys/archive_backend.h b/src/core/file_sys/archive_backend.h
index 79fde9710..7f64fe4e2 100644
--- a/src/core/file_sys/archive_backend.h
+++ b/src/core/file_sys/archive_backend.h
@@ -21,7 +21,13 @@ class FileBackend;
class DirectoryBackend;
// Path string type
-enum LowPathType : u32 { Invalid = 0, Empty = 1, Binary = 2, Char = 3, Wchar = 4 };
+enum LowPathType : u32 {
+ Invalid = 0,
+ Empty = 1,
+ Binary = 2,
+ Char = 3,
+ Wchar = 4,
+};
union Mode {
u32 hex;
@@ -32,12 +38,9 @@ union Mode {
class Path {
public:
- Path() : type(Invalid) {
- }
- Path(const char* path) : type(Char), string(path) {
- }
- Path(std::vector<u8> binary_data) : type(Binary), binary(std::move(binary_data)) {
- }
+ Path() : type(Invalid) {}
+ Path(const char* path) : type(Char), string(path) {}
+ Path(std::vector<u8> binary_data) : type(Binary), binary(std::move(binary_data)) {}
Path(LowPathType type, u32 size, u32 pointer);
LowPathType GetType() const {
@@ -61,22 +64,18 @@ private:
std::u16string u16str;
};
+/// Parameters of the archive, as specified in the Create or Format call.
struct ArchiveFormatInfo {
- u32_le total_size; ///< The pre-defined size of the archive, as specified in the Create or
- /// Format call
- u32_le number_directories; ///< The pre-defined number of directories in the archive, as
- /// specified in the Create or Format call
- u32_le number_files; ///< The pre-defined number of files in the archive, as specified in the
- /// Create or Format call
- u8 duplicate_data; ///< Whether the archive should duplicate the data, as specified in the
- /// Create or Format call
+ u32_le total_size; ///< The pre-defined size of the archive.
+ u32_le number_directories; ///< The pre-defined number of directories in the archive.
+ u32_le number_files; ///< The pre-defined number of files in the archive.
+ u8 duplicate_data; ///< Whether the archive should duplicate the data.
};
static_assert(std::is_pod<ArchiveFormatInfo>::value, "ArchiveFormatInfo is not POD");
class ArchiveBackend : NonCopyable {
public:
- virtual ~ArchiveBackend() {
- }
+ virtual ~ArchiveBackend() {}
/**
* Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.)
@@ -153,8 +152,7 @@ public:
class ArchiveFactory : NonCopyable {
public:
- virtual ~ArchiveFactory() {
- }
+ virtual ~ArchiveFactory() {}
/**
* Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.)