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 /AffinityPanel.c | |
parent | 1b2d48bc9aa93254c48d10bb34acde9596b526b9 (diff) |
Mark several non-modified pointer variables const
Diffstat (limited to 'AffinityPanel.c')
-rw-r--r-- | AffinityPanel.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/AffinityPanel.c b/AffinityPanel.c index a4d63616..57211050 100644 --- a/AffinityPanel.c +++ b/AffinityPanel.c @@ -357,7 +357,7 @@ static const char* const AffinityPanelFunctions[] = { static const char* const AffinityPanelKeys[] = {"Enter", "Esc", "F1", "F2", "F3"}; static const int AffinityPanelEvents[] = {13, 27, KEY_F(1), KEY_F(2), KEY_F(3)}; -Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity, int* width) { +Panel* AffinityPanel_new(ProcessList* pl, const Affinity* affinity, int* width) { AffinityPanel* this = AllocThis(AffinityPanel); Panel* super = (Panel*) this; Panel_init(super, 1, 1, 1, 1, Class(MaskItem), false, FunctionBar_new(AffinityPanelFunctions, AffinityPanelKeys, AffinityPanelEvents)); @@ -418,7 +418,7 @@ Panel* AffinityPanel_new(ProcessList* pl, Affinity* affinity, int* width) { } Affinity* AffinityPanel_getAffinity(Panel* super, ProcessList* pl) { - AffinityPanel* this = (AffinityPanel*) super; + const AffinityPanel* this = (AffinityPanel*) super; Affinity* affinity = Affinity_new(pl); #ifdef HAVE_LIBHWLOC @@ -428,7 +428,7 @@ Affinity* AffinityPanel_getAffinity(Panel* super, ProcessList* pl) { hwloc_bitmap_foreach_end(); #else for (int i = 0; i < this->pl->cpuCount; i++) { - MaskItem* item = (MaskItem*)Vector_get(this->cpuids, i); + const MaskItem* item = (const MaskItem*)Vector_get(this->cpuids, i); if (item->value) { Affinity_add(affinity, item->cpu); } |