From cca78559ef42d6debf034c73ea8fdd0ddbac2f06 Mon Sep 17 00:00:00 2001 From: LowLevelMahn Date: Sun, 29 Mar 2026 11:19:08 +0200 Subject: [PATCH] fixes clang 21.1.8 warnings --- src/app/settings.cpp | 2 +- src/shape/shapeview.cpp | 1 - src/shape/types.h | 12 ++++++------ 3 files changed, 7 insertions(+), 8 deletions(-) diff --git a/src/app/settings.cpp b/src/app/settings.cpp index 905ea11..026450d 100644 --- a/src/app/settings.cpp +++ b/src/app/settings.cpp @@ -230,7 +230,7 @@ Materials Settings::getMaterials() QStringList colors = value(PATH_MATERIALS_COLORS).toStringList(); QStringList patterns = value(PATH_MATERIALS_PATTERNS).toStringList(); - if (colors.empty() | patterns.empty()) { + if (colors.empty() || patterns.empty()) { return restoreMaterials(); } diff --git a/src/shape/shapeview.cpp b/src/shape/shapeview.cpp index 1e1dcf7..425c42e 100644 --- a/src/shape/shapeview.cpp +++ b/src/shape/shapeview.cpp @@ -211,7 +211,6 @@ void ShapeView::draw(bool pick) MaterialsList* materialsList = primitive.materialsModel->materialsList(); int material = materialsList->at(m_currentPaintJob); - QColor color; bool selected = false, pattern = false; diff --git a/src/shape/types.h b/src/shape/types.h index 159ef66..e0520b5 100644 --- a/src/shape/types.h +++ b/src/shape/types.h @@ -3,23 +3,23 @@ #include #include -typedef struct { +struct Vertex{ qint16 x; qint16 y; qint16 z; inline QVector3D toQ() const { return QVector3D(x, y, z); } -} Vertex; +}; typedef QList VerticesList; -typedef struct { +struct VertexF{ float x; float y; float z; inline QVector3D toQ() const { return QVector3D(x, y, z); } -} VertexF; +}; typedef QList VerticesFList; @@ -29,7 +29,7 @@ typedef QList MaterialsList; class MaterialsModel; -typedef struct { +struct Primitive{ quint8 type; bool twoSided; bool zBias; @@ -37,6 +37,6 @@ typedef struct { MaterialsModel* materialsModel; quint32 cull1; quint32 cull2; -} Primitive; +}; typedef QList PrimitivesList;