diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2021-01-05 23:42:55 +0100 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2021-01-11 20:12:34 +0100 |
commit | d72b0a682ecad0a8d5793022733447e855a61798 (patch) | |
tree | d9bc511bb716030fd73675bd3474e5a043636d73 /ProcessList.c | |
parent | 1b2d48bc9aa93254c48d10bb34acde9596b526b9 (diff) |
Mark several non-modified pointer variables const
Diffstat (limited to 'ProcessList.c')
-rw-r--r-- | ProcessList.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ProcessList.c b/ProcessList.c index 055ad1f1..585a9194 100644 --- a/ProcessList.c +++ b/ProcessList.c @@ -93,7 +93,7 @@ static const char* alignedProcessFieldTitle(ProcessField field) { return titleBuffer; } -void ProcessList_printHeader(ProcessList* this, RichString* header) { +void ProcessList_printHeader(const ProcessList* this, RichString* header) { RichString_prune(header); const Settings* settings = this->settings; @@ -141,11 +141,11 @@ void ProcessList_add(ProcessList* this, Process* p) { assert(Hashtable_count(this->processTable) == Vector_count(this->processes)); } -void ProcessList_remove(ProcessList* this, Process* p) { +void ProcessList_remove(ProcessList* this, const Process* p) { assert(Vector_indexOf(this->processes, p, Process_pidCompare) != -1); assert(Hashtable_get(this->processTable, p->pid) != NULL); - Process* pp = Hashtable_remove(this->processTable, p->pid); + const Process* pp = Hashtable_remove(this->processTable, p->pid); assert(pp == p); (void)pp; pid_t pid = p->pid; @@ -169,7 +169,7 @@ Process* ProcessList_get(ProcessList* this, int idx) { return (Process*)Vector_get(this->processes, idx); } -int ProcessList_size(ProcessList* this) { +int ProcessList_size(const ProcessList* this) { return Vector_size(this->processes); } |