Mark ProcessList_keyAt argument const

This commit is contained in:
Christian Göttsche 2020-11-04 17:46:11 +01:00 committed by BenBE
parent 42073babb9
commit 91317322fe
3 changed files with 3 additions and 3 deletions

View File

@ -59,7 +59,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
if (EVENT_IS_HEADER_CLICK(ch)) { if (EVENT_IS_HEADER_CLICK(ch)) {
int x = EVENT_HEADER_CLICK_GET_X(ch); int x = EVENT_HEADER_CLICK_GET_X(ch);
ProcessList* pl = this->state->pl; const ProcessList* pl = this->state->pl;
Settings* settings = this->state->settings; Settings* settings = this->state->settings;
int hx = super->scrollH + x + 1; int hx = super->scrollH + x + 1;
ProcessField field = ProcessList_keyAt(pl, hx); ProcessField field = ProcessList_keyAt(pl, hx);

View File

@ -231,7 +231,7 @@ void ProcessList_sort(ProcessList* this) {
} }
ProcessField ProcessList_keyAt(ProcessList* this, int at) { ProcessField ProcessList_keyAt(const ProcessList* this, int at) {
int x = 0; int x = 0;
const ProcessField* fields = this->settings->fields; const ProcessField* fields = this->settings->fields;
ProcessField field; ProcessField field;

View File

@ -95,7 +95,7 @@ int ProcessList_size(ProcessList* this);
void ProcessList_sort(ProcessList* this); void ProcessList_sort(ProcessList* this);
ProcessField ProcessList_keyAt(ProcessList* this, int at); ProcessField ProcessList_keyAt(const ProcessList* this, int at);
void ProcessList_expandTree(ProcessList* this); void ProcessList_expandTree(ProcessList* this);