Commit Graph

25 Commits

Author SHA1 Message Date
Lioncash
042cb07ed3 file_sys/registered_cache: Use unique_ptr and regular pointers instead of shared_ptrs where applicable
The data retrieved in these cases are ultimately chiefly owned by either
the RegisteredCache instance itself, or the filesystem factories. Both
these should live throughout the use of their contained data. If they
don't, it should be considered an interface/design issue, and using
shared_ptr instances here would mask that, as the data would always be
prolonged after the main owner's lifetime ended.

This makes the lifetime of the data explicit and makes it harder to
accidentally create cyclic references. It also makes the interface
slightly more flexible than the previous API, as a shared_ptr can be
created from a unique_ptr, but not the other way around, so this allows
for that use-case if it ever becomes necessary in some form.
2018-10-16 09:38:52 -04:00
Lioncash
ca724cff46 vfs_concat/vfs_layered: Remove friend declarations from ConcatenatedVfsFile
Given these are only added to the class to allow those functions to
access the private constructor, it's a better approach to just make them
static functions in the interface, to make the dependency explicit.
2018-09-25 20:06:01 -04:00
Zach Hilman
041d0b88d9 fsmitm: Cleanup and modernize fsmitm port 2018-09-23 21:50:20 -04:00
Zach Hilman
708a580563 qt: Add UI elements for LayeredFS and related tools 2018-09-21 19:53:33 -04:00
fearlessTobi
ac0723e7be Port #4182 from Citra: "Prefix all size_t with std::" 2018-09-15 15:21:06 +02:00
Zach Hilman
c13664fec3 bktr: Fix missing includes and optimize style 2018-09-04 16:24:02 -04:00
Zach Hilman
708ca9bb02 registration: Add RegisteredCacheUnion
Aggregates multiple caches into one interface
2018-09-04 16:21:40 -04:00
Zach Hilman
b790146494 main: Only show DRD deprecation warning once 2018-09-04 14:44:48 -04:00
Zach Hilman
d09884845e registration: Add support for installing NSP files 2018-09-04 14:28:41 -04:00
Lioncash
7a7b311c4e file_sys: Replace includes with forward declarations where applicable
Cuts down on include dependencies, resulting in less files that need to
be rebuilt when certain things are changed.
2018-09-03 22:52:24 -04:00
Lioncash
94745b24ed vfs_real: Forward declare IOFile
Eliminates the need to rebuild some source files if the file_util header
ever changes. This also uncovered some indirect inclusions, which have
also been fixed.
2018-09-02 12:38:14 -04:00
Lioncash
388730d177 registered_cache: Get rid of variable shadowing in ProcessFiles()
Prevents compiler warnings.
2018-08-27 15:55:56 -04:00
Zach Hilman
129f55b31f file_sys: Cut down on includes and copies 2018-08-23 11:53:30 -04:00
Zach Hilman
40c590e917 registration: Add GetEntryUnparsed methods
Returns the file before calling parser on it.
2018-08-23 11:53:30 -04:00
Zach Hilman
03a9dbe066 registration: Add Data_Unknown5 NCAContentType 2018-08-20 17:34:18 -04:00
Zach Hilman
a0925fe02d filesystem: Add support for loading of system archives 2018-08-18 21:28:23 -04:00
Lioncash
2aeef2dfa7 common: Namespace hex_util.h/.cpp
It's in the common code, so it should be under the Common namespace like
everything else.
2018-08-15 23:24:00 -04:00
Zach Hilman
7862a19f64 registration: Various style and documentation improvements
Fix logic in RealVfsFilesystem Create methods
Remove magic numbers
Fix regex errors
2018-08-12 15:55:44 -04:00
Zach Hilman
821bd68208 registration: Add support for force overwrite of installed 2018-08-11 23:01:42 -04:00
Zach Hilman
933289e2f4 registration: Update documentation and style 2018-08-11 22:50:48 -04:00
Zach Hilman
13b76d7a82 registration: Take RawCopy function as parameter
Instead of defaulting to VfsRawCopy
2018-08-11 22:50:48 -04:00
Zach Hilman
811529cb19 registered_cache: Fix missing reading from yuzu_meta 2018-08-11 22:50:48 -04:00
Zach Hilman
c5acb8db61 file_sys: Comply to style guidelines 2018-08-11 22:50:48 -04:00
Zach Hilman
ebc9fda77a qt: Add 'Install to NAND' option to menu
Prompts for title type on NCA files.
2018-08-11 22:50:48 -04:00
Zach Hilman
09dbef4cdb file_sys: Add RegisteredCache
Manages NAND NCA get and install.
2018-08-11 22:50:48 -04:00