mirror of
https://github.com/xzeldon/htop.git
synced 2024-12-24 23:15:46 +00:00
Settings: mark non-modified pointer parameters const
This commit is contained in:
parent
d37d66bb3a
commit
c38819a675
@ -262,7 +262,7 @@ static void writeFields(FILE* fd, const ProcessField* fields, const char* name)
|
||||
fprintf(fd, "\n");
|
||||
}
|
||||
|
||||
static void writeMeters(Settings* this, FILE* fd, int column) {
|
||||
static void writeMeters(const Settings* this, FILE* fd, int column) {
|
||||
const char* sep = "";
|
||||
for (int i = 0; i < this->columns[column].len; i++) {
|
||||
fprintf(fd, "%s%s", sep, this->columns[column].names[i]);
|
||||
@ -271,7 +271,7 @@ static void writeMeters(Settings* this, FILE* fd, int column) {
|
||||
fprintf(fd, "\n");
|
||||
}
|
||||
|
||||
static void writeMeterModes(Settings* this, FILE* fd, int column) {
|
||||
static void writeMeterModes(const Settings* this, FILE* fd, int column) {
|
||||
const char* sep = "";
|
||||
for (int i = 0; i < this->columns[column].len; i++) {
|
||||
fprintf(fd, "%s%d", sep, this->columns[column].modes[i]);
|
||||
@ -280,7 +280,7 @@ static void writeMeterModes(Settings* this, FILE* fd, int column) {
|
||||
fprintf(fd, "\n");
|
||||
}
|
||||
|
||||
bool Settings_write(Settings* this) {
|
||||
bool Settings_write(const Settings* this) {
|
||||
FILE* fd = fopen(this->filename, "w");
|
||||
if (fd == NULL)
|
||||
return false;
|
||||
|
@ -87,7 +87,7 @@ static inline int Settings_getActiveDirection(const Settings* this) {
|
||||
|
||||
void Settings_delete(Settings* this);
|
||||
|
||||
bool Settings_write(Settings* this);
|
||||
bool Settings_write(const Settings* this);
|
||||
|
||||
Settings* Settings_new(int initialCpuCount);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user