strat: use m_ for member variables
This commit is contained in:
@@ -21,23 +21,23 @@ namespace ams::ncm {
|
||||
NON_COPYABLE(RegisteredPath);
|
||||
NON_MOVEABLE(RegisteredPath);
|
||||
private:
|
||||
ContentId content_id;
|
||||
Path path;
|
||||
ContentId m_content_id;
|
||||
Path m_path;
|
||||
public:
|
||||
RegisteredPath(const ncm::ContentId &content_id, const Path &p) : content_id(content_id), path(p) {
|
||||
RegisteredPath(const ncm::ContentId &content_id, const Path &p) : m_content_id(content_id), m_path(p) {
|
||||
/* ... */
|
||||
}
|
||||
|
||||
ncm::ContentId GetContentId() const {
|
||||
return this->content_id;
|
||||
return m_content_id;
|
||||
}
|
||||
|
||||
void GetPath(Path *out) const {
|
||||
*out = this->path;
|
||||
*out = m_path;
|
||||
}
|
||||
|
||||
void SetPath(const Path &path) {
|
||||
this->path = path;
|
||||
m_path = path;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -46,10 +46,10 @@ namespace ams::ncm {
|
||||
}
|
||||
|
||||
Result RegisteredHostContent::RegisterPath(const ncm::ContentId &content_id, const ncm::Path &path) {
|
||||
std::scoped_lock lk(this->mutex);
|
||||
std::scoped_lock lk(m_mutex);
|
||||
|
||||
/* Replace the path of any existing entries. */
|
||||
for (auto ®istered_path : this->path_list) {
|
||||
for (auto ®istered_path : m_path_list) {
|
||||
if (registered_path.GetContentId() == content_id) {
|
||||
registered_path.SetPath(path);
|
||||
return ResultSuccess();
|
||||
@@ -61,15 +61,15 @@ namespace ams::ncm {
|
||||
R_UNLESS(registered_path != nullptr, ncm::ResultBufferInsufficient());
|
||||
|
||||
/* Insert the path into the list. */
|
||||
this->path_list.push_back(*registered_path);
|
||||
m_path_list.push_back(*registered_path);
|
||||
return ResultSuccess();
|
||||
}
|
||||
|
||||
Result RegisteredHostContent::GetPath(Path *out, const ncm::ContentId &content_id) {
|
||||
std::scoped_lock lk(this->mutex);
|
||||
std::scoped_lock lk(m_mutex);
|
||||
|
||||
/* Obtain the path of the content. */
|
||||
for (const auto ®istered_path : this->path_list) {
|
||||
for (const auto ®istered_path : m_path_list) {
|
||||
if (registered_path.GetContentId() == content_id) {
|
||||
registered_path.GetPath(out);
|
||||
return ResultSuccess();
|
||||
@@ -80,9 +80,9 @@ namespace ams::ncm {
|
||||
|
||||
void RegisteredHostContent::ClearPaths() {
|
||||
/* Remove all paths. */
|
||||
for (auto it = this->path_list.begin(); it != this->path_list.end(); /* ... */) {
|
||||
for (auto it = m_path_list.begin(); it != m_path_list.end(); /* ... */) {
|
||||
auto *obj = std::addressof(*it);
|
||||
it = this->path_list.erase(it);
|
||||
it = m_path_list.erase(it);
|
||||
delete obj;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user