mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-12 12:14:36 +03:00
Mark several non-modified pointer variables const
This commit is contained in:

committed by
BenBE

parent
1b2d48bc9a
commit
d72b0a682e
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user