strat: use m_ for member variables
This commit is contained in:
@@ -30,22 +30,22 @@ namespace ams::lr {
|
||||
}
|
||||
|
||||
Result LocationResolverManagerImpl::OpenLocationResolver(sf::Out<sf::SharedPointer<ILocationResolver>> out, ncm::StorageId storage_id) {
|
||||
std::scoped_lock lk(this->mutex);
|
||||
std::scoped_lock lk(m_mutex);
|
||||
/* Find an existing resolver. */
|
||||
auto resolver = this->location_resolvers.Find(storage_id);
|
||||
auto resolver = m_location_resolvers.Find(storage_id);
|
||||
|
||||
/* No existing resolver is present, create one. */
|
||||
if (!resolver) {
|
||||
if (storage_id == ncm::StorageId::Host) {
|
||||
AMS_ABORT_UNLESS(this->location_resolvers.Insert(storage_id, RedirectOnlyLocationResolverFactory::CreateSharedEmplaced<ILocationResolver, RedirectOnlyLocationResolverImpl>()));
|
||||
AMS_ABORT_UNLESS(m_location_resolvers.Insert(storage_id, RedirectOnlyLocationResolverFactory::CreateSharedEmplaced<ILocationResolver, RedirectOnlyLocationResolverImpl>()));
|
||||
} else {
|
||||
auto content_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<ILocationResolver, ContentLocationResolverImpl>(storage_id);
|
||||
R_TRY(content_resolver->Refresh());
|
||||
AMS_ABORT_UNLESS(this->location_resolvers.Insert(storage_id, std::move(content_resolver)));
|
||||
AMS_ABORT_UNLESS(m_location_resolvers.Insert(storage_id, std::move(content_resolver)));
|
||||
}
|
||||
|
||||
/* Acquire the newly-created resolver. */
|
||||
resolver = this->location_resolvers.Find(storage_id);
|
||||
resolver = m_location_resolvers.Find(storage_id);
|
||||
}
|
||||
|
||||
/* Copy the output interface. */
|
||||
@@ -54,23 +54,23 @@ namespace ams::lr {
|
||||
}
|
||||
|
||||
Result LocationResolverManagerImpl::OpenRegisteredLocationResolver(sf::Out<sf::SharedPointer<IRegisteredLocationResolver>> out) {
|
||||
std::scoped_lock lk(this->mutex);
|
||||
std::scoped_lock lk(m_mutex);
|
||||
|
||||
/* No existing resolver is present, create one. */
|
||||
if (!this->registered_location_resolver) {
|
||||
this->registered_location_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<IRegisteredLocationResolver, RegisteredLocationResolverImpl>();
|
||||
if (!m_registered_location_resolver) {
|
||||
m_registered_location_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<IRegisteredLocationResolver, RegisteredLocationResolverImpl>();
|
||||
}
|
||||
|
||||
/* Copy the output interface. */
|
||||
*out = this->registered_location_resolver;
|
||||
*out = m_registered_location_resolver;
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result LocationResolverManagerImpl::RefreshLocationResolver(ncm::StorageId storage_id) {
|
||||
std::scoped_lock lk(this->mutex);
|
||||
std::scoped_lock lk(m_mutex);
|
||||
|
||||
/* Attempt to find an existing resolver. */
|
||||
auto resolver = this->location_resolvers.Find(storage_id);
|
||||
auto resolver = m_location_resolvers.Find(storage_id);
|
||||
R_UNLESS(resolver, lr::ResultUnknownStorageId());
|
||||
|
||||
/* Refresh the resolver. */
|
||||
@@ -82,15 +82,15 @@ namespace ams::lr {
|
||||
}
|
||||
|
||||
Result LocationResolverManagerImpl::OpenAddOnContentLocationResolver(sf::Out<sf::SharedPointer<IAddOnContentLocationResolver>> out) {
|
||||
std::scoped_lock lk(this->mutex);
|
||||
std::scoped_lock lk(m_mutex);
|
||||
|
||||
/* No existing resolver is present, create one. */
|
||||
if (!this->add_on_content_location_resolver) {
|
||||
this->add_on_content_location_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<IAddOnContentLocationResolver, AddOnContentLocationResolverImpl>();
|
||||
if (!m_add_on_content_location_resolver) {
|
||||
m_add_on_content_location_resolver = ContentLocationResolverFactory::CreateSharedEmplaced<IAddOnContentLocationResolver, AddOnContentLocationResolverImpl>();
|
||||
}
|
||||
|
||||
/* Copy the output interface. */
|
||||
*out = this->add_on_content_location_resolver;
|
||||
*out = m_add_on_content_location_resolver;
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user