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

@@ -23,17 +23,17 @@ namespace ams::ddsf {
AMS_ASSERT(device->IsDriverAttached());
/* Acquire exclusive access to the manager. */
std::scoped_lock lk(this->entry_list_lock);
std::scoped_lock lk(m_entry_list_lock);
/* Check that we don't already have an entry with the code. */
for (const auto &holder : this->entry_list) {
for (const auto &holder : m_entry_list) {
AMS_ASSERT(holder.IsConstructed());
AMS_ASSERT(holder.Get().GetDeviceCode() != device_code);
AMS_UNUSED(holder);
}
/* Allocate memory for a new device code entry holder. */
void *holder_storage = this->memory_resource->Allocate(sizeof(DeviceCodeEntryHolder));
void *holder_storage = m_memory_resource->Allocate(sizeof(DeviceCodeEntryHolder));
R_UNLESS(holder_storage != nullptr, ddsf::ResultOutOfResource());
/* Initialize the new holder. */
@@ -41,18 +41,18 @@ namespace ams::ddsf {
holder->Construct(device_code, device);
/* Link the new holder. */
holder->AddTo(this->entry_list);
holder->AddTo(m_entry_list);
return ResultSuccess();
}
bool DeviceCodeEntryManager::Remove(DeviceCode device_code) {
/* Acquire exclusive access to the manager. */
std::scoped_lock lk(this->entry_list_lock);
std::scoped_lock lk(m_entry_list_lock);
/* Find and erase the entry. */
bool erased = false;
for (auto it = this->entry_list.begin(); it != this->entry_list.end(); /* ... */) {
for (auto it = m_entry_list.begin(); it != m_entry_list.end(); /* ... */) {
/* Get the current entry, and advance the iterator. */
DeviceCodeEntryHolder *cur = std::addressof(*(it++));
@@ -62,7 +62,7 @@ namespace ams::ddsf {
/* Destroy and deallocate the holder. */
cur->Destroy();
std::destroy_at(cur);
this->memory_resource->Deallocate(cur, sizeof(*cur));
m_memory_resource->Deallocate(cur, sizeof(*cur));
erased = true;
}