mirror of
https://github.com/yuzu-emu/yuzu-android
synced 2024-12-23 19:11:21 -08:00
settings_common: Use a vector in category linkage
Improve storage requirements.
This commit is contained in:
parent
ffb384463f
commit
2911988b85
@ -12,7 +12,7 @@ BasicSetting::BasicSetting(Linkage& linkage, const std::string& name, enum Categ
|
|||||||
: label{name}, category{category_}, id{linkage.count}, save{save_},
|
: label{name}, category{category_}, id{linkage.count}, save{save_},
|
||||||
runtime_modifiable{runtime_modifiable_}, specialization{specialization_},
|
runtime_modifiable{runtime_modifiable_}, specialization{specialization_},
|
||||||
other_setting{other_setting_} {
|
other_setting{other_setting_} {
|
||||||
linkage.by_category[category].push_front(this);
|
linkage.by_category[category].push_back(this);
|
||||||
linkage.count++;
|
linkage.count++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class Linkage {
|
|||||||
public:
|
public:
|
||||||
explicit Linkage(u32 initial_count = 0);
|
explicit Linkage(u32 initial_count = 0);
|
||||||
~Linkage();
|
~Linkage();
|
||||||
std::map<Category, std::forward_list<BasicSetting*>> by_category{};
|
std::map<Category, std::vector<BasicSetting*>> by_category{};
|
||||||
std::vector<std::function<void()>> restore_functions{};
|
std::vector<std::function<void()>> restore_functions{};
|
||||||
u32 count;
|
u32 count;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user