diff options
| author | 2018-09-25 18:17:42 -0400 | |
|---|---|---|
| committer | 2018-09-25 20:06:21 -0400 | |
| commit | 91b56c49280355cf4d1d4283ce05645a85aac1fb (patch) | |
| tree | d0109661742439bb50cdeeaa14dc990bdcb2a329 /src/core | |
| parent | fsmitm_romfsbuild: Remove unnecessary loops in Build() (diff) | |
| download | yuzu-91b56c49280355cf4d1d4283ce05645a85aac1fb.tar.gz yuzu-91b56c49280355cf4d1d4283ce05645a85aac1fb.tar.xz yuzu-91b56c49280355cf4d1d4283ce05645a85aac1fb.zip | |
fsmitm_romfsbuild: Remove unnecessary constructors and initializers for RomFSBuildFileContext and RomFSBuildDirectoryContext
There's no need to duplicate in-class initializers with a constructor
initializer list. std::strings also initialize to empty by default.
Diffstat (limited to 'src/core')
| -rw-r--r-- | src/core/file_sys/fsmitm_romfsbuild.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/file_sys/fsmitm_romfsbuild.cpp b/src/core/file_sys/fsmitm_romfsbuild.cpp index b8807e5ca..20dd69570 100644 --- a/src/core/file_sys/fsmitm_romfsbuild.cpp +++ b/src/core/file_sys/fsmitm_romfsbuild.cpp | |||
| @@ -73,7 +73,7 @@ static_assert(sizeof(RomFSFileEntry) == 0x20, "RomFSFileEntry has incorrect size | |||
| 73 | struct RomFSBuildFileContext; | 73 | struct RomFSBuildFileContext; |
| 74 | 74 | ||
| 75 | struct RomFSBuildDirectoryContext { | 75 | struct RomFSBuildDirectoryContext { |
| 76 | std::string path = ""; | 76 | std::string path; |
| 77 | u32 cur_path_ofs = 0; | 77 | u32 cur_path_ofs = 0; |
| 78 | u32 path_len = 0; | 78 | u32 path_len = 0; |
| 79 | u32 entry_offset = 0; | 79 | u32 entry_offset = 0; |
| @@ -84,7 +84,7 @@ struct RomFSBuildDirectoryContext { | |||
| 84 | }; | 84 | }; |
| 85 | 85 | ||
| 86 | struct RomFSBuildFileContext { | 86 | struct RomFSBuildFileContext { |
| 87 | std::string path = ""; | 87 | std::string path; |
| 88 | u32 cur_path_ofs = 0; | 88 | u32 cur_path_ofs = 0; |
| 89 | u32 path_len = 0; | 89 | u32 path_len = 0; |
| 90 | u32 entry_offset = 0; | 90 | u32 entry_offset = 0; |
| @@ -92,9 +92,7 @@ struct RomFSBuildFileContext { | |||
| 92 | u64 size = 0; | 92 | u64 size = 0; |
| 93 | std::shared_ptr<RomFSBuildDirectoryContext> parent; | 93 | std::shared_ptr<RomFSBuildDirectoryContext> parent; |
| 94 | std::shared_ptr<RomFSBuildFileContext> sibling; | 94 | std::shared_ptr<RomFSBuildFileContext> sibling; |
| 95 | VirtualFile source = nullptr; | 95 | VirtualFile source; |
| 96 | |||
| 97 | RomFSBuildFileContext() : path(""), cur_path_ofs(0), path_len(0) {} | ||
| 98 | }; | 96 | }; |
| 99 | 97 | ||
| 100 | static u32 romfs_calc_path_hash(u32 parent, std::string path, u32 start, std::size_t path_len) { | 98 | static u32 romfs_calc_path_hash(u32 parent, std::string path, u32 start, std::size_t path_len) { |