From ea5b663b163ec9b08d601ca1f6ff643f1b768bb3 Mon Sep 17 00:00:00 2001 From: Linus Dierheimer Date: Sat, 12 Feb 2022 12:38:14 +0100 Subject: [PATCH] Rename class to deviceClass, so cpp linters don't see a problem --- src/detection/temps.c | 9 ++++----- src/fastfetch.h | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/detection/temps.c b/src/detection/temps.c index cb923e45f..485e0b79e 100644 --- a/src/detection/temps.c +++ b/src/detection/temps.c @@ -3,7 +3,6 @@ #include #include #include -#include static bool isTempFile(const char* name) { @@ -47,10 +46,10 @@ static bool parseHwmonDir(FFstrbuf* dir, FFTempValue* value) ffStrbufSubstrBefore(dir, dirLength); ffStrbufAppendS(dir, "device/class"); - ffGetFileContent(dir->chars, &value->class); + ffGetFileContent(dir->chars, &value->deviceClass); ffStrbufSubstrBefore(dir, dirLength); - return value->name.length > 0 || value->class.length > 0; + return value->name.length > 0 || value->deviceClass.length > 0; } const FFTempsResult* ffDetectTemps(const FFinstance* instance) @@ -95,12 +94,12 @@ const FFTempsResult* ffDetectTemps(const FFinstance* instance) FFTempValue* temp = ffListAdd(&result.values); ffStrbufInit(&temp->name); - ffStrbufInit(&temp->class); + ffStrbufInit(&temp->deviceClass); ffStrbufInit(&temp->value); if(!parseHwmonDir(&baseDir, temp)) { ffStrbufDestroy(&temp->name); - ffStrbufDestroy(&temp->class); + ffStrbufDestroy(&temp->deviceClass); ffStrbufDestroy(&temp->value); --result.values.length; } diff --git a/src/fastfetch.h b/src/fastfetch.h index 814f9fbd3..bb4d4e015 100644 --- a/src/fastfetch.h +++ b/src/fastfetch.h @@ -235,7 +235,7 @@ typedef struct FFTempValue { FFstrbuf name; FFstrbuf value; - FFstrbuf class; + FFstrbuf deviceClass; } FFTempValue; typedef struct FFTempsResult