summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Göttsche <cgzones@googlemail.com>2020-11-04 17:46:11 +0100
committerBenBE <BenBE@geshi.org>2020-11-15 18:35:30 +0100
commit91317322fee239082f04f410a5f6506a61a7ac9c (patch)
treeba317ae5f7b956ef0accbdb6148a43c3f6acba35
parent42073babb913497fba58700dc0c5ccdfa7a52b20 (diff)
Mark ProcessList_keyAt argument const
-rw-r--r--MainPanel.c2
-rw-r--r--ProcessList.c2
-rw-r--r--ProcessList.h2
3 files changed, 3 insertions, 3 deletions
diff --git a/MainPanel.c b/MainPanel.c
index be59abd3..5a1fe8f5 100644
--- a/MainPanel.c
+++ b/MainPanel.c
@@ -59,7 +59,7 @@ static HandlerResult MainPanel_eventHandler(Panel* super, int ch) {
if (EVENT_IS_HEADER_CLICK(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;
int hx = super->scrollH + x + 1;
ProcessField field = ProcessList_keyAt(pl, hx);
diff --git a/ProcessList.c b/ProcessList.c
index 2323c99a..457761a2 100644
--- a/ProcessList.c
+++ b/ProcessList.c
@@ -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;
const ProcessField* fields = this->settings->fields;
ProcessField field;
diff --git a/ProcessList.h b/ProcessList.h
index 6b075fa7..737fffb3 100644
--- a/ProcessList.h
+++ b/ProcessList.h
@@ -95,7 +95,7 @@ int ProcessList_size(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);

© 2014-2024 Faster IT GmbH | imprint | privacy policy