diff options
| author | 2023-07-19 13:46:48 -0400 | |
|---|---|---|
| committer | 2023-07-21 10:56:55 -0400 | |
| commit | 2911988b852ec29016780aabb1f46e2d0c231744 (patch) | |
| tree | ee8e0c2838ab83bb68c931bc3023b13f7c1a6322 /src | |
| parent | settings: Remove sorting from log (diff) | |
| download | yuzu-2911988b852ec29016780aabb1f46e2d0c231744.tar.gz yuzu-2911988b852ec29016780aabb1f46e2d0c231744.tar.xz yuzu-2911988b852ec29016780aabb1f46e2d0c231744.zip | |
settings_common: Use a vector in category linkage
Improve storage requirements.
Diffstat (limited to '')
| -rw-r--r-- | src/common/settings_common.cpp | 2 | ||||
| -rw-r--r-- | src/common/settings_common.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/common/settings_common.cpp b/src/common/settings_common.cpp index 1439fb451..90842e797 100644 --- a/src/common/settings_common.cpp +++ b/src/common/settings_common.cpp | |||
| @@ -12,7 +12,7 @@ BasicSetting::BasicSetting(Linkage& linkage, const std::string& name, enum Categ | |||
| 12 | : label{name}, category{category_}, id{linkage.count}, save{save_}, | 12 | : label{name}, category{category_}, id{linkage.count}, save{save_}, |
| 13 | runtime_modifiable{runtime_modifiable_}, specialization{specialization_}, | 13 | runtime_modifiable{runtime_modifiable_}, specialization{specialization_}, |
| 14 | other_setting{other_setting_} { | 14 | other_setting{other_setting_} { |
| 15 | linkage.by_category[category].push_front(this); | 15 | linkage.by_category[category].push_back(this); |
| 16 | linkage.count++; | 16 | linkage.count++; |
| 17 | } | 17 | } |
| 18 | 18 | ||
diff --git a/src/common/settings_common.h b/src/common/settings_common.h index a7630a97f..bfd1bad64 100644 --- a/src/common/settings_common.h +++ b/src/common/settings_common.h | |||
| @@ -66,7 +66,7 @@ class Linkage { | |||
| 66 | public: | 66 | public: |
| 67 | explicit Linkage(u32 initial_count = 0); | 67 | explicit Linkage(u32 initial_count = 0); |
| 68 | ~Linkage(); | 68 | ~Linkage(); |
| 69 | std::map<Category, std::forward_list<BasicSetting*>> by_category{}; | 69 | std::map<Category, std::vector<BasicSetting*>> by_category{}; |
| 70 | std::vector<std::function<void()>> restore_functions{}; | 70 | std::vector<std::function<void()>> restore_functions{}; |
| 71 | u32 count; | 71 | u32 count; |
| 72 | }; | 72 | }; |