mirror of
https://github.com/Atmosphere-NX/Atmosphere.git
synced 2025-05-31 06:48:22 -04:00
ncm: hot take, uninitialized data bad
This commit is contained in:
parent
dfcb5005d2
commit
a89c5dd5d7
18 changed files with 36 additions and 36 deletions
|
@ -25,7 +25,7 @@ namespace ams::lr {
|
|||
private:
|
||||
sf::SharedPointer<IAddOnContentLocationResolver> m_interface;
|
||||
public:
|
||||
AddOnContentLocationResolver() { /* ... */ }
|
||||
AddOnContentLocationResolver() : m_interface(nullptr) { /* ... */ }
|
||||
explicit AddOnContentLocationResolver(sf::SharedPointer<IAddOnContentLocationResolver> intf) : m_interface(intf) { /* ... */ }
|
||||
|
||||
AddOnContentLocationResolver(AddOnContentLocationResolver &&rhs) {
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace ams::lr {
|
|||
private:
|
||||
sf::SharedPointer<ILocationResolver> m_interface;
|
||||
public:
|
||||
LocationResolver() { /* ... */ }
|
||||
LocationResolver() : m_interface(nullptr) { /* ... */ }
|
||||
explicit LocationResolver(sf::SharedPointer<ILocationResolver> intf) : m_interface(intf) { /* ... */ }
|
||||
|
||||
LocationResolver(LocationResolver &&rhs) {
|
||||
|
|
|
@ -25,7 +25,7 @@ namespace ams::lr {
|
|||
private:
|
||||
sf::SharedPointer<IRegisteredLocationResolver> m_interface;
|
||||
public:
|
||||
RegisteredLocationResolver() { /* ... */ }
|
||||
RegisteredLocationResolver() : m_interface(nullptr) { /* ... */ }
|
||||
explicit RegisteredLocationResolver(sf::SharedPointer<IRegisteredLocationResolver> intf) : m_interface(intf) { /* ... */ }
|
||||
|
||||
RegisteredLocationResolver(RegisteredLocationResolver &&rhs) {
|
||||
|
|
|
@ -84,7 +84,7 @@ namespace ams::ncm {
|
|||
fs::ContentStorageId content_storage_id;
|
||||
sf::SharedPointer<IContentStorage> content_storage;
|
||||
|
||||
ContentStorageRoot() { /* ... */ }
|
||||
ContentStorageRoot() : mount_name(), path(), storage_id(), content_storage_id(), content_storage() { /* ... */ }
|
||||
};
|
||||
|
||||
struct ContentMetaDatabaseRoot {
|
||||
|
@ -100,7 +100,7 @@ namespace ams::ncm {
|
|||
ContentMetaMemoryResource *memory_resource;
|
||||
u32 max_content_metas;
|
||||
|
||||
ContentMetaDatabaseRoot() { /* ... */ }
|
||||
ContentMetaDatabaseRoot() : mount_name(), path(), storage_id(), info(), content_meta_database(), kvs(util::nullopt), memory_resource(), max_content_metas() { /* ... */ }
|
||||
};
|
||||
private:
|
||||
os::SdkRecursiveMutex m_mutex;
|
||||
|
|
|
@ -28,7 +28,7 @@ namespace ams::ncm {
|
|||
private:
|
||||
sf::SharedPointer<IContentMetaDatabase> m_interface;
|
||||
public:
|
||||
ContentMetaDatabase() { /* ... */ }
|
||||
ContentMetaDatabase() : m_interface(nullptr) { /* ... */ }
|
||||
explicit ContentMetaDatabase(sf::SharedPointer<IContentMetaDatabase> intf) : m_interface(intf) { /* ... */ }
|
||||
|
||||
ContentMetaDatabase(ContentMetaDatabase &&rhs) {
|
||||
|
|
|
@ -23,7 +23,7 @@ namespace ams::ncm {
|
|||
private:
|
||||
sf::SharedPointer<IContentStorage> m_interface;
|
||||
public:
|
||||
ContentStorage() { /* ... */ }
|
||||
ContentStorage() : m_interface(nullptr) { /* ... */ }
|
||||
explicit ContentStorage(sf::SharedPointer<IContentStorage> intf) : m_interface(intf) { /* ... */ }
|
||||
|
||||
ContentStorage(ContentStorage &&rhs) {
|
||||
|
|
|
@ -82,18 +82,18 @@ namespace ams::ncm {
|
|||
NON_COPYABLE(InstallTaskBase);
|
||||
NON_MOVEABLE(InstallTaskBase);
|
||||
private:
|
||||
crypto::Sha256Generator m_sha256_generator;
|
||||
StorageId m_install_storage;
|
||||
InstallTaskDataBase *m_data;
|
||||
InstallProgress m_progress;
|
||||
os::SdkMutex m_progress_mutex;
|
||||
u32 m_config;
|
||||
os::SdkMutex m_cancel_mutex;
|
||||
bool m_cancel_requested;
|
||||
InstallThroughput m_throughput;
|
||||
TimeSpan m_throughput_start_time;
|
||||
os::SdkMutex m_throughput_mutex;
|
||||
FirmwareVariationId m_firmware_variation_id;
|
||||
crypto::Sha256Generator m_sha256_generator{};
|
||||
StorageId m_install_storage{};
|
||||
InstallTaskDataBase *m_data{};
|
||||
InstallProgress m_progress{};
|
||||
os::SdkMutex m_progress_mutex{};
|
||||
u32 m_config{};
|
||||
os::SdkMutex m_cancel_mutex{};
|
||||
bool m_cancel_requested{};
|
||||
InstallThroughput m_throughput{};
|
||||
TimeSpan m_throughput_start_time{};
|
||||
os::SdkMutex m_throughput_mutex{};
|
||||
FirmwareVariationId m_firmware_variation_id{};
|
||||
private:
|
||||
ALWAYS_INLINE Result SetLastResultOnFailure(Result result) {
|
||||
if (R_FAILED(result)) {
|
||||
|
|
|
@ -64,7 +64,7 @@ namespace ams::ncm {
|
|||
Result m_last_result;
|
||||
SystemUpdateTaskApplyInfo m_system_update_task_apply_info;
|
||||
public:
|
||||
MemoryInstallTaskData() : m_state(InstallProgressState::NotPrepared), m_last_result(ResultSuccess()) { /* ... */ };
|
||||
MemoryInstallTaskData() : m_data_list(), m_state(InstallProgressState::NotPrepared), m_last_result(ResultSuccess()), m_system_update_task_apply_info() { /* ... */ };
|
||||
~MemoryInstallTaskData() {
|
||||
this->Cleanup();
|
||||
}
|
||||
|
@ -104,8 +104,8 @@ namespace ams::ncm {
|
|||
|
||||
static_assert(sizeof(EntryInfo) == 0x10);
|
||||
private:
|
||||
Header m_header;
|
||||
char m_path[64];
|
||||
Header m_header{};
|
||||
char m_path[64]{};
|
||||
private:
|
||||
static constexpr Header MakeInitialHeader(s32 max_entries) {
|
||||
return {
|
||||
|
|
|
@ -20,7 +20,7 @@ namespace ams::ncm {
|
|||
|
||||
class PackageInstallTask : public PackageInstallTaskBase {
|
||||
private:
|
||||
MemoryInstallTaskData m_data;
|
||||
MemoryInstallTaskData m_data{};
|
||||
public:
|
||||
Result Initialize(const char *package_root, StorageId storage_id, void *buffer, size_t buffer_size, bool ignore_ticket);
|
||||
protected:
|
||||
|
|
|
@ -24,8 +24,8 @@ namespace ams::ncm {
|
|||
using PackagePath = kvdb::BoundedString<256>;
|
||||
private:
|
||||
PackagePath m_package_root;
|
||||
void *m_buffer;
|
||||
size_t m_buffer_size;
|
||||
void *m_buffer{};
|
||||
size_t m_buffer_size{};
|
||||
public:
|
||||
PackageInstallTaskBase() : m_package_root() { /* ... */ }
|
||||
|
||||
|
|
|
@ -22,10 +22,10 @@ namespace ams::ncm {
|
|||
private:
|
||||
using PackagePath = kvdb::BoundedString<0x100>;
|
||||
private:
|
||||
PackagePath m_context_path;
|
||||
FileInstallTaskData m_data;
|
||||
ContentMetaDatabase m_package_db;
|
||||
bool m_gamecard_content_meta_database_active;
|
||||
PackagePath m_context_path{};
|
||||
FileInstallTaskData m_data{};
|
||||
ContentMetaDatabase m_package_db{};
|
||||
bool m_gamecard_content_meta_database_active{};
|
||||
public:
|
||||
~PackageSystemUpdateTask();
|
||||
|
||||
|
|
|
@ -37,7 +37,7 @@ namespace ams::ncm {
|
|||
u64 m_counter;
|
||||
os::SdkMutex m_mutex;
|
||||
public:
|
||||
RightsIdCache() : m_mutex() {
|
||||
RightsIdCache() : m_entries(), m_counter(2), m_mutex() {
|
||||
this->Invalidate();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue