From dd59cce8e9981c807e21c19b3fef5d6f0e0928d9 Mon Sep 17 00:00:00 2001 From: David Carter Date: Wed, 12 Mar 2025 12:11:51 -0400 Subject: [PATCH] Linter fixes --- src/Mod/Material/App/FolderTree.h | 4 ++-- src/Mod/Material/App/Library.cpp | 2 -- tests/src/Mod/Material/App/TestMaterials.cpp | 4 ++-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/src/Mod/Material/App/FolderTree.h b/src/Mod/Material/App/FolderTree.h index 8e12302d3e..1482016b9a 100644 --- a/src/Mod/Material/App/FolderTree.h +++ b/src/Mod/Material/App/FolderTree.h @@ -56,7 +56,7 @@ public: _type = type; } - const std::shared_ptr>>> getFolder() const + std::shared_ptr>>> getFolder() const { assert(_type == NodeType::FolderNode); return _folder; @@ -87,7 +87,7 @@ public: setType(NodeType::DataNode); _data = data; } - void setUUID(const QString uuid) + void setUUID(const QString& uuid) { setType(NodeType::DataNode); _uuid = uuid; diff --git a/src/Mod/Material/App/Library.cpp b/src/Mod/Material/App/Library.cpp index 4a1c690f61..57bbd50480 100644 --- a/src/Mod/Material/App/Library.cpp +++ b/src/Mod/Material/App/Library.cpp @@ -97,8 +97,6 @@ bool Library::isRoot(const QString& path) const { QString localPath = getLocalPath(path); QString cleanPath = getLocalPath(QStringLiteral("")); - std::string pLocal = localPath.toStdString(); - std::string pclean = cleanPath.toStdString(); return (cleanPath == localPath); } diff --git a/tests/src/Mod/Material/App/TestMaterials.cpp b/tests/src/Mod/Material/App/TestMaterials.cpp index e47b8dc59a..7c3b31a6cf 100644 --- a/tests/src/Mod/Material/App/TestMaterials.cpp +++ b/tests/src/Mod/Material/App/TestMaterials.cpp @@ -31,8 +31,8 @@ #include #include -#include #include +#include #include #include @@ -97,7 +97,7 @@ TEST_F(TestMaterial, TestMaterialsWithModel) // All LinearElastic models should be in IsotropicLinearElastic since it is inherited EXPECT_LE(materialsLinearElastic->size(), materials->size()); - for (auto itp : *materialsLinearElastic) { + for (auto &itp : *materialsLinearElastic) { auto mat = itp.first; EXPECT_NO_THROW(materials->at(mat)); }