strat: use m_ for member variables

This commit is contained in:
Michael Scire 2021-10-10 00:14:06 -07:00
parent ce28591ab2
commit a595c232b9
425 changed files with 8531 additions and 8484 deletions

View file

@ -49,7 +49,7 @@ namespace ams::updater {
}
Result BisAccessor::Initialize() {
return fs::OpenBisPartition(std::addressof(this->storage), this->partition_id);
return fs::OpenBisPartition(std::addressof(m_storage), m_partition_id);
}
void BisAccessor::Finalize() {
@ -58,12 +58,12 @@ namespace ams::updater {
Result BisAccessor::Read(void *dst, size_t size, u64 offset) {
AMS_ABORT_UNLESS((offset % SectorAlignment) == 0);
return this->storage->Read(static_cast<u32>(offset), dst, size);
return m_storage->Read(static_cast<u32>(offset), dst, size);
}
Result BisAccessor::Write(u64 offset, const void *src, size_t size) {
AMS_ABORT_UNLESS((offset % SectorAlignment) == 0);
return this->storage->Write(static_cast<u32>(offset), src, size);
return m_storage->Write(static_cast<u32>(offset), src, size);
}
Result BisAccessor::Write(u64 offset, size_t size, const char *bip_path, void *work_buffer, size_t work_buffer_size) {

View file

@ -24,10 +24,10 @@ namespace ams::updater {
public:
static constexpr size_t SectorAlignment = 0x200;
private:
std::unique_ptr<fs::IStorage> storage;
const fs::BisPartitionId partition_id;
std::unique_ptr<fs::IStorage> m_storage;
const fs::BisPartitionId m_partition_id;
public:
explicit BisAccessor(fs::BisPartitionId id) : partition_id(id) { /* ... */ }
explicit BisAccessor(fs::BisPartitionId id) : m_partition_id(id) { /* ... */ }
public:
Result Initialize();

View file

@ -34,30 +34,30 @@ namespace ams::updater {
AMS_ABORT_UNLESS(util::IsAligned(reinterpret_cast<uintptr_t>(work_buffer), os::MemoryPageSize));
AMS_ABORT_UNLESS(util::IsAligned(work_buffer_size, 0x200));
R_TRY(this->accessor.Initialize());
this->save_buffer = work_buffer;
R_TRY(m_accessor.Initialize());
m_save_buffer = work_buffer;
return ResultSuccess();
}
void BisSave::Finalize() {
this->accessor.Finalize();
m_accessor.Finalize();
}
Result BisSave::Load() {
size_t read_size;
return this->accessor.Read(&read_size, this->save_buffer, SaveSize, Boot0Partition::BctSave);
return m_accessor.Read(std::addressof(read_size), m_save_buffer, SaveSize, Boot0Partition::BctSave);
}
Result BisSave::Save() {
return this->accessor.Write(this->save_buffer, SaveSize, Boot0Partition::BctSave);
return m_accessor.Write(m_save_buffer, SaveSize, Boot0Partition::BctSave);
}
bool BisSave::GetNeedsVerification(BootModeType mode) {
return reinterpret_cast<const u8 *>(this->save_buffer)[GetVerificationFlagOffset(mode)] != 0;
return reinterpret_cast<const u8 *>(m_save_buffer)[GetVerificationFlagOffset(mode)] != 0;
}
void BisSave::SetNeedsVerification(BootModeType mode, bool needs_verification) {
reinterpret_cast<u8 *>(this->save_buffer)[GetVerificationFlagOffset(mode)] = needs_verification ? 1 : 0;
reinterpret_cast<u8 *>(m_save_buffer)[GetVerificationFlagOffset(mode)] = needs_verification ? 1 : 0;
}
}

View file

@ -23,10 +23,10 @@ namespace ams::updater {
public:
static constexpr size_t SaveSize = BctSize;
private:
Boot0Accessor accessor;
void *save_buffer;
Boot0Accessor m_accessor;
void *m_save_buffer;
public:
BisSave() : save_buffer(nullptr) { }
BisSave() : m_accessor(), m_save_buffer(nullptr) { }
private:
static size_t GetVerificationFlagOffset(BootModeType mode);
public: