diff options
| author | Yuri Kunde Schlesner <yuriks@yuriks.net> | 2016-09-21 11:29:48 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-09-21 11:29:48 -0700 |
| commit | d5d2ca8058a0f1c00ab7ca9fe2c058ba47546c0a (patch) | |
| tree | 8a22ca73ff838f3f0090b29a548ae81087fc90ed /src/core/file_sys/archive_backend.h | |
| parent | 2a910a6d883f2227edc74aacf5b93a58a3dea07c (diff) | |
| parent | 0e3f0120a8ec2996e73bb6b7b6c9d7531f7a7eb1 (diff) | |
Merge pull request #2086 from linkmauve/clang-format
Add clang-format as part of our {commit,travis}-time checks
Diffstat (limited to 'src/core/file_sys/archive_backend.h')
| -rw-r--r-- | src/core/file_sys/archive_backend.h | 33 |
1 files changed, 16 insertions, 17 deletions
diff --git a/src/core/file_sys/archive_backend.h b/src/core/file_sys/archive_backend.h index 5d91e47f3..d69c3c785 100644 --- a/src/core/file_sys/archive_backend.h +++ b/src/core/file_sys/archive_backend.h @@ -8,14 +8,11 @@ #include <string> #include <utility> #include <vector> - #include "common/bit_field.h" #include "common/common_types.h" #include "common/swap.h" - #include "core/hle/result.h" - namespace FileSys { class FileBackend; @@ -24,10 +21,10 @@ class DirectoryBackend; // Path string type enum LowPathType : u32 { Invalid = 0, - Empty = 1, - Binary = 2, - Char = 3, - Wchar = 4 + Empty = 1, + Binary = 2, + Char = 3, + Wchar = 4, }; union Mode { @@ -44,7 +41,9 @@ public: Path(std::vector<u8> binary_data) : type(Binary), binary(std::move(binary_data)) {} Path(LowPathType type, u32 size, u32 pointer); - LowPathType GetType() const { return type; } + LowPathType GetType() const { + return type; + } /** * Gets the string representation of the path for debugging @@ -63,18 +62,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.) @@ -87,7 +86,8 @@ public: * @param mode Mode to open the file with * @return Opened file, or error code */ - virtual ResultVal<std::unique_ptr<FileBackend>> OpenFile(const Path& path, const Mode mode) const = 0; + virtual ResultVal<std::unique_ptr<FileBackend>> OpenFile(const Path& path, + const Mode mode) const = 0; /** * Delete a file specified by its path @@ -150,8 +150,7 @@ public: class ArchiveFactory : NonCopyable { public: - virtual ~ArchiveFactory() { - } + virtual ~ArchiveFactory() {} /** * Get a descriptive name for the archive (e.g. "RomFS", "SaveData", etc.) |
