mirror of
https://github.com/xzeldon/htop.git
synced 2025-07-13 04:34:35 +03:00
Mark process parameter of Process_writeField consistently const
This commit is contained in:

committed by
cgzones

parent
72103e9613
commit
7109172431
@ -24,7 +24,7 @@ const ProcessClass FreeBSDProcess_class = {
|
||||
.delete = Process_delete,
|
||||
.compare = FreeBSDProcess_compare
|
||||
},
|
||||
.writeField = (Process_WriteField) FreeBSDProcess_writeField,
|
||||
.writeField = FreeBSDProcess_writeField,
|
||||
};
|
||||
|
||||
ProcessFieldData Process_fields[] = {
|
||||
@ -83,8 +83,8 @@ void Process_delete(Object* cast) {
|
||||
free(this);
|
||||
}
|
||||
|
||||
void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField field) {
|
||||
FreeBSDProcess* fp = (FreeBSDProcess*) this;
|
||||
void FreeBSDProcess_writeField(const Process* this, RichString* str, ProcessField field) {
|
||||
const FreeBSDProcess* fp = (const FreeBSDProcess*) this;
|
||||
char buffer[256]; buffer[255] = '\0';
|
||||
int attr = CRT_colors[DEFAULT_COLOR];
|
||||
int n = sizeof(buffer) - 1;
|
||||
|
@ -43,7 +43,7 @@ FreeBSDProcess* FreeBSDProcess_new(Settings* settings);
|
||||
|
||||
void Process_delete(Object* cast);
|
||||
|
||||
void FreeBSDProcess_writeField(Process* this, RichString* str, ProcessField field);
|
||||
void FreeBSDProcess_writeField(const Process* this, RichString* str, ProcessField field);
|
||||
|
||||
long FreeBSDProcess_compare(const void* v1, const void* v2);
|
||||
|
||||
|
Reference in New Issue
Block a user