mirror of
https://github.com/Atmosphere-NX/Atmosphere
synced 2024-12-22 20:31:14 +00:00
fix SubStorage copy ctor/= op for new shared_ptr member
This commit is contained in:
parent
01f7f567b9
commit
3f6010b4dc
1 changed files with 7 additions and 6 deletions
|
@ -33,9 +33,10 @@ namespace ams::fs {
|
|||
public:
|
||||
SubStorage() : m_shared_base_storage(), m_base_storage(nullptr), m_offset(0), m_size(0), m_resizable(false) { /* ... */ }
|
||||
|
||||
SubStorage(const SubStorage &rhs) : m_shared_base_storage(), m_base_storage(rhs.m_base_storage), m_offset(rhs.m_offset), m_size(rhs.m_size), m_resizable(rhs.m_resizable) { /* ... */}
|
||||
SubStorage(const SubStorage &rhs) : m_shared_base_storage(rhs.m_shared_base_storage), m_base_storage(rhs.m_base_storage), m_offset(rhs.m_offset), m_size(rhs.m_size), m_resizable(rhs.m_resizable) { /* ... */}
|
||||
SubStorage &operator=(const SubStorage &rhs) {
|
||||
if (this != std::addressof(rhs)) {
|
||||
m_shared_base_storage = rhs.m_shared_base_storage;
|
||||
m_base_storage = rhs.m_base_storage;
|
||||
m_offset = rhs.m_offset;
|
||||
m_size = rhs.m_size;
|
||||
|
@ -56,7 +57,7 @@ namespace ams::fs {
|
|||
AMS_ABORT_UNLESS(m_size >= 0);
|
||||
}
|
||||
|
||||
SubStorage(SubStorage *sub, s64 o, s64 sz) : m_shared_base_storage(), m_base_storage(sub->m_base_storage), m_offset(o + sub->m_offset), m_size(sz), m_resizable(false) {
|
||||
SubStorage(SubStorage *sub, s64 o, s64 sz) : m_shared_base_storage(sub->m_shared_base_storage), m_base_storage(sub->m_base_storage), m_offset(o + sub->m_offset), m_size(sz), m_resizable(false) {
|
||||
AMS_ABORT_UNLESS(this->IsValid());
|
||||
AMS_ABORT_UNLESS(m_offset >= 0);
|
||||
AMS_ABORT_UNLESS(m_size >= 0);
|
||||
|
|
Loading…
Reference in a new issue