mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-18 13:57:58 -05:00
Manually tweak source formatting and then re-run clang-format
This commit is contained in:
@ -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.)
|
||||
|
@ -48,11 +48,10 @@ ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveData::Open(const P
|
||||
std::string concrete_mount_point =
|
||||
GetSaveDataPath(mount_point, Kernel::g_current_process->codeset->program_id);
|
||||
if (!FileUtil::Exists(concrete_mount_point)) {
|
||||
// When a SaveData archive is created for the first time, it is not yet formatted
|
||||
// and the save file/directory structure expected by the game has not yet been initialized.
|
||||
// When a SaveData archive is created for the first time, it is not yet formatted and the
|
||||
// save file/directory structure expected by the game has not yet been initialized.
|
||||
// Returning the NotFormatted error code will signal the game to provision the SaveData
|
||||
// archive
|
||||
// with the files and folders that it expects.
|
||||
// archive with the files and folders that it expects.
|
||||
return ResultCode(ErrorDescription::FS_NotFormatted, ErrorModule::FS,
|
||||
ErrorSummary::InvalidState, ErrorLevel::Status);
|
||||
}
|
||||
|
@ -30,8 +30,7 @@ static std::string GetSaveDataCheckPath(const std::string& mount_point, u32 high
|
||||
}
|
||||
|
||||
ArchiveFactory_SaveDataCheck::ArchiveFactory_SaveDataCheck(const std::string& nand_directory)
|
||||
: mount_point(GetSaveDataCheckContainerPath(nand_directory)) {
|
||||
}
|
||||
: mount_point(GetSaveDataCheckContainerPath(nand_directory)) {}
|
||||
|
||||
ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SaveDataCheck::Open(const Path& path) {
|
||||
auto vec = path.AsBinary();
|
||||
|
@ -49,8 +49,7 @@ Path ConstructSystemSaveDataBinaryPath(u32 high, u32 low) {
|
||||
}
|
||||
|
||||
ArchiveFactory_SystemSaveData::ArchiveFactory_SystemSaveData(const std::string& nand_path)
|
||||
: base_path(GetSystemSaveDataContainerPath(nand_path)) {
|
||||
}
|
||||
: base_path(GetSystemSaveDataContainerPath(nand_path)) {}
|
||||
|
||||
ResultVal<std::unique_ptr<ArchiveBackend>> ArchiveFactory_SystemSaveData::Open(const Path& path) {
|
||||
std::string fullpath = GetSystemSaveDataPath(base_path, path);
|
||||
|
@ -38,10 +38,8 @@ static_assert(offsetof(Entry, file_size) == 0x220, "Wrong offset for file_size i
|
||||
|
||||
class DirectoryBackend : NonCopyable {
|
||||
public:
|
||||
DirectoryBackend() {
|
||||
}
|
||||
virtual ~DirectoryBackend() {
|
||||
}
|
||||
DirectoryBackend() {}
|
||||
virtual ~DirectoryBackend() {}
|
||||
|
||||
/**
|
||||
* Open the directory
|
||||
|
@ -29,8 +29,7 @@ namespace FileSys {
|
||||
*/
|
||||
class DiskArchive : public ArchiveBackend {
|
||||
public:
|
||||
DiskArchive(const std::string& mount_point_) : mount_point(mount_point_) {
|
||||
}
|
||||
DiskArchive(const std::string& mount_point_) : mount_point(mount_point_) {}
|
||||
|
||||
virtual std::string GetName() const override {
|
||||
return "DiskArchive: " + mount_point;
|
||||
|
@ -16,10 +16,8 @@ namespace FileSys {
|
||||
|
||||
class FileBackend : NonCopyable {
|
||||
public:
|
||||
FileBackend() {
|
||||
}
|
||||
virtual ~FileBackend() {
|
||||
}
|
||||
FileBackend() {}
|
||||
virtual ~FileBackend() {}
|
||||
|
||||
/**
|
||||
* Open the file
|
||||
|
@ -30,8 +30,7 @@ namespace FileSys {
|
||||
class IVFCArchive : public ArchiveBackend {
|
||||
public:
|
||||
IVFCArchive(std::shared_ptr<FileUtil::IOFile> file, u64 offset, u64 size)
|
||||
: romfs_file(file), data_offset(offset), data_size(size) {
|
||||
}
|
||||
: romfs_file(file), data_offset(offset), data_size(size) {}
|
||||
|
||||
std::string GetName() const override;
|
||||
|
||||
@ -55,8 +54,7 @@ protected:
|
||||
class IVFCFile : public FileBackend {
|
||||
public:
|
||||
IVFCFile(std::shared_ptr<FileUtil::IOFile> file, u64 offset, u64 size)
|
||||
: romfs_file(file), data_offset(offset), data_size(size) {
|
||||
}
|
||||
: romfs_file(file), data_offset(offset), data_size(size) {}
|
||||
|
||||
ResultCode Open() override {
|
||||
return RESULT_SUCCESS;
|
||||
@ -68,8 +66,7 @@ public:
|
||||
bool Close() const override {
|
||||
return false;
|
||||
}
|
||||
void Flush() const override {
|
||||
}
|
||||
void Flush() const override {}
|
||||
|
||||
private:
|
||||
std::shared_ptr<FileUtil::IOFile> romfs_file;
|
||||
|
Reference in New Issue
Block a user