mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-04 14:01:25 +12:00
Memory leak fixed
This commit is contained in:
parent
8e4ad3dfcb
commit
717d99795c
2 changed files with 2 additions and 17 deletions
|
@ -163,16 +163,3 @@ std::string config_context_t::to_string() const
|
||||||
|
|
||||||
return result.str();
|
return result.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
void config_context_t::add_group(const std::string& name)
|
|
||||||
{
|
|
||||||
new group(this, name);
|
|
||||||
}
|
|
||||||
|
|
||||||
config_context_t::group& config_context_t::get_group(const std::string& name)
|
|
||||||
{
|
|
||||||
if (!m_groups[name])
|
|
||||||
add_group(name);
|
|
||||||
|
|
||||||
return *m_groups[name];
|
|
||||||
}
|
|
||||||
|
|
|
@ -14,6 +14,7 @@ protected:
|
||||||
group* m_parent;
|
group* m_parent;
|
||||||
config_context_t* m_cfg;
|
config_context_t* m_cfg;
|
||||||
std::string m_name;
|
std::string m_name;
|
||||||
|
std::vector<std::unique_ptr<entry_base>> m_entries;
|
||||||
|
|
||||||
void init();
|
void init();
|
||||||
|
|
||||||
|
@ -30,7 +31,7 @@ protected:
|
||||||
template<typename T>
|
template<typename T>
|
||||||
void add_entry(const std::string& name, const T& def_value)
|
void add_entry(const std::string& name, const T& def_value)
|
||||||
{
|
{
|
||||||
new entry<T>(this, name, def_value);
|
m_entries.emplace_back(std::make_unique<entry<T>>(this, name, def_value));
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
|
@ -158,7 +159,4 @@ public:
|
||||||
void set_defaults();
|
void set_defaults();
|
||||||
|
|
||||||
std::string to_string() const;
|
std::string to_string() const;
|
||||||
|
|
||||||
void add_group(const std::string& name);
|
|
||||||
group& get_group(const std::string& name);
|
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue