mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-23 22:55:46 +00:00
Mark several non-modified pointer variables const
This commit is contained in:
parent
960f52b783
commit
2b62126aea
@ -31,7 +31,7 @@ static void AvailableMetersPanel_delete(Object* object) {
|
||||
}
|
||||
|
||||
static inline void AvailableMetersPanel_addMeter(Header* header, Panel* panel, const MeterClass* type, int param, int column) {
|
||||
Meter* meter = Header_addMeterByClass(header, type, param, column);
|
||||
const Meter* meter = Header_addMeterByClass(header, type, param, column);
|
||||
Panel_add(panel, (Object*) Meter_toListItem(meter, false));
|
||||
Panel_setSelected(panel, Panel_size(panel) - 1);
|
||||
MetersPanel_setMoving((MetersPanel*)panel, true);
|
||||
|
@ -216,7 +216,7 @@ MetersPanel* MetersPanel_new(Settings* settings, const char* header, Vector* met
|
||||
this->leftNeighbor = NULL;
|
||||
Panel_setHeader(super, header);
|
||||
for (int i = 0; i < Vector_size(meters); i++) {
|
||||
Meter* meter = (Meter*) Vector_get(meters, i);
|
||||
const Meter* meter = (const Meter*) Vector_get(meters, i);
|
||||
Panel_add(super, (Object*) Meter_toListItem(meter, false));
|
||||
}
|
||||
return this;
|
||||
|
2
htop.c
2
htop.c
@ -215,7 +215,7 @@ static CommandLineSettings parseArguments(int argc, char** argv) {
|
||||
assert(optarg); /* please clang analyzer, cause optarg can be NULL in the 'u' case */
|
||||
char* argCopy = xStrdup(optarg);
|
||||
char* saveptr;
|
||||
char* pid = strtok_r(argCopy, ",", &saveptr);
|
||||
const char* pid = strtok_r(argCopy, ",", &saveptr);
|
||||
|
||||
if(!flags.pidMatchList) {
|
||||
flags.pidMatchList = Hashtable_new(8, false);
|
||||
|
@ -754,7 +754,7 @@ static void Platform_Battery_getSysData(double* percent, ACPresence* isOnAC) {
|
||||
}
|
||||
|
||||
char* buf = buffer;
|
||||
char* line = NULL;
|
||||
const char* line;
|
||||
bool full = false;
|
||||
bool now = false;
|
||||
int fullSize = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user