diff options
author | Nathan Scott <nathans@redhat.com> | 2023-04-04 16:24:37 +1000 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-04-06 00:19:54 +0200 |
commit | e7f447b6a3473a572d3e6c191128f1796477860d (patch) | |
tree | 1e8a90d216055dfe77b688fc48c0a42f18637d71 /CommandLine.c | |
parent | c8a61850dd31ab64eb8ad83929ce86d2adbeb96c (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 'CommandLine.c')
-rw-r--r-- | CommandLine.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/CommandLine.c b/CommandLine.c index 682e0542..83359206 100644 --- a/CommandLine.c +++ b/CommandLine.c @@ -322,14 +322,14 @@ int CommandLine_run(const char* name, int argc, char** argv) { Process_setupColumnWidths(); UsersTable* ut = UsersTable_new(); - Hashtable* dc = DynamicColumns_new(); Hashtable* dm = DynamicMeters_new(); + Hashtable* dc = DynamicColumns_new(); if (!dc) dc = Hashtable_new(0, true); - ProcessList* pl = ProcessList_new(ut, dm, dc, flags.pidMatchList, flags.userId); + ProcessList* pl = ProcessList_new(ut, flags.pidMatchList, flags.userId); - Settings* settings = Settings_new(pl->activeCPUs, dc); + Settings* settings = Settings_new(pl->activeCPUs, dm, dc); pl->settings = settings; Header* header = Header_new(pl, settings, 2); |