summaryrefslogtreecommitdiffstats
path: root/Settings.c
diff options
context:
space:
mode:
authorNathan Scott <nathans@redhat.com>2023-04-04 16:24:37 +1000
committerBenBE <BenBE@geshi.org>2023-04-06 00:19:54 +0200
commite7f447b6a3473a572d3e6c191128f1796477860d (patch)
tree1e8a90d216055dfe77b688fc48c0a42f18637d71 /Settings.c
parentc8a61850dd31ab64eb8ad83929ce86d2adbeb96c (diff)
Refactor and consolidate dynamic meters/columns pointers
This removes the duplication of dynamic meter/column hashtable pointers that has come in between the Settings and ProcessList structures - only one copy of these is needed. With the future planned dynamic screens feature adding another pointer, let us first clean this up before any further duplication happens.
Diffstat (limited to 'Settings.c')
-rw-r--r--Settings.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Settings.c b/Settings.c
index 8543b9e4..c712966e 100644
--- a/Settings.c
+++ b/Settings.c
@@ -667,10 +667,11 @@ int Settings_write(const Settings* this, bool onCrash) {
return r;
}
-Settings* Settings_new(unsigned int initialCpuCount, Hashtable* dynamicColumns) {
+Settings* Settings_new(unsigned int initialCpuCount, Hashtable* dynamicMeters, Hashtable* dynamicColumns) {
Settings* this = xCalloc(1, sizeof(Settings));
this->dynamicColumns = dynamicColumns;
+ this->dynamicMeters = dynamicMeters;
this->hLayout = HF_TWO_50_50;
this->hColumns = xCalloc(HeaderLayout_getColumns(this->hLayout), sizeof(MeterColumnSetting));

© 2014-2024 Faster IT GmbH | imprint | privacy policy